/* ==========================================================================
   MINIMALIST & MODERN DESIGN SYSTEM
   Inspiration: Vercel / Linear / Apple Developer UI
   ========================================================================== */

:root {
  /* Dark Theme (Default) */
  --bg: #0a0a0c;
  --bg-surface: #121316;
  --bg-surface-hover: #181a1f;
  --bg-subtle: #1c1e24;
  
  --border: #23252c;
  --border-hover: #3b3e49;

  --text-primary: #ededed;
  --text-secondary: #9da3af;
  --text-muted: #656a76;

  --accent: #38bdf8;
  --accent-subtle: rgba(56, 189, 248, 0.1);
  --accent-green: #34d399;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 820px;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-surface: #f9fafb;
  --bg-surface-hover: #f3f4f6;
  --bg-subtle: #e5e7eb;

  --border: #e5e7eb;
  --border-hover: #d1d5db;

  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  --accent: #0284c7;
  --accent-subtle: rgba(2, 132, 199, 0.08);
  --accent-green: #059669;
}

/* --------------------------------------------------------------------------
   Resets & Base Layout
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

[data-theme="light"] body {
  background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
}

/* --------------------------------------------------------------------------
   Ambient Cursor Glow (Subtle & Premium)
   -------------------------------------------------------------------------- */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  background: radial-gradient(
    680px circle at var(--mouse-x, 50vw) var(--mouse-y, 50vh),
    rgba(56, 189, 248, 0.075),
    rgba(99, 102, 241, 0.035),
    transparent 65%
  );
  will-change: background;
}

[data-theme="light"] .ambient-glow {
  background: radial-gradient(
    680px circle at var(--mouse-x, 50vw) var(--mouse-y, 50vh),
    rgba(2, 132, 199, 0.06),
    rgba(147, 51, 234, 0.025),
    transparent 65%
  );
}

.ambient-glow.active {
  opacity: 1;
}

.container, header, main, footer {
  position: relative;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
}

h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

p {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  background: var(--bg);
  background-color: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 1rem 0;
  transition: background-color var(--transition), border-color var(--transition);
}

[data-theme="light"] .header {
  background-color: rgba(255, 255, 255, 0.85);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
}

.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.theme-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-surface);
}

/* --------------------------------------------------------------------------
   Sections General
   -------------------------------------------------------------------------- */
section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding: 4.5rem 0 3.5rem;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--accent-green);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
}

.hero-title {
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-bio {
  font-size: 1.02rem;
  max-width: 680px;
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Skills Pills Grid
   -------------------------------------------------------------------------- */
.skills-group {
  margin-bottom: 1.75rem;
}

.skills-group:last-child {
  margin-bottom: 0;
}

.skills-group-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.skills-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  font-size: 0.88rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.skill-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
}

/* --------------------------------------------------------------------------
   Project Cards
   -------------------------------------------------------------------------- */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-item {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
  overflow: hidden;
}

.project-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    400px circle at var(--card-x, -500px) var(--card-y, -500px),
    rgba(56, 189, 248, 0.08),
    transparent 65%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .project-item::before {
  background: radial-gradient(
    400px circle at var(--card-x, -500px) var(--card-y, -500px),
    rgba(2, 132, 199, 0.05),
    transparent 65%
  );
}

.project-item:hover::before {
  opacity: 1;
}

.project-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
}

.project-header,
.project-desc,
.project-tech,
.project-links {
  position: relative;
  z-index: 1;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.project-name {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-subtle);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.project-desc {
  margin-bottom: 1rem;
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
  font-weight: 500;
  transition: color var(--transition);
}

.project-link:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.contact-box {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  overflow: hidden;
  transition: all var(--transition);
}

.contact-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    400px circle at var(--card-x, -500px) var(--card-y, -500px),
    rgba(56, 189, 248, 0.08),
    transparent 65%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .contact-box::before {
  background: radial-gradient(
    400px circle at var(--card-x, -500px) var(--card-y, -500px),
    rgba(2, 132, 199, 0.05),
    transparent 65%
  );
}

.contact-box:hover::before {
  opacity: 1;
}

.contact-box:hover {
  border-color: var(--border-hover);
}

.contact-box > * {
  position: relative;
  z-index: 1;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.contact-link-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: all var(--transition);
  cursor: pointer;
}

.contact-link-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
}

/* --------------------------------------------------------------------------
   Toast Notification
   -------------------------------------------------------------------------- */
.toast-msg {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--text-primary);
  color: var(--bg);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all var(--transition);
  z-index: 200;
}

.toast-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Responsive Design & Mobile Optimization
   -------------------------------------------------------------------------- */

/* Tablets & Small Screens (<= 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  section {
    padding: 2.5rem 0;
  }

  .hero {
    padding: 3.5rem 0 2.25rem;
  }

  .contact-links {
    gap: 0.75rem;
  }
}

/* Standard Mobile Devices (<= 600px) */
@media (max-width: 600px) {
  .header {
    padding: 0.75rem 0;
  }

  .nav {
    gap: 0.75rem;
  }

  .nav-brand {
    font-size: 0.98rem;
  }

  .nav-links {
    gap: 0.9rem;
  }

  .nav-link {
    font-size: 0.82rem;
  }

  .theme-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .hero {
    padding: 2.75rem 0 2rem;
  }

  .status-indicator {
    font-size: 0.78rem;
    padding: 3px 9px;
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: clamp(1.85rem, 8vw, 2.35rem);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
  }

  .hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 0.85rem;
  }

  .hero-bio {
    font-size: 0.94rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    gap: 0.65rem;
  }

  .btn {
    padding: 0.65rem 1.1rem;
    font-size: 0.88rem;
  }

  h2 {
    font-size: 1.22rem;
    margin-bottom: 1rem;
  }

  p {
    font-size: 0.94rem;
  }

  .skills-group {
    margin-bottom: 1.35rem;
  }

  .skills-group-title {
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
  }

  .skills-pills {
    gap: 0.4rem;
  }

  .skill-pill {
    font-size: 0.82rem;
    padding: 0.3rem 0.7rem;
  }

  .projects-list {
    gap: 1.15rem;
  }

  .project-item {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
  }

  .project-name {
    font-size: 1.08rem;
    line-height: 1.3;
  }

  .project-tag {
    font-size: 0.72rem;
    padding: 2px 7px;
  }

  .project-desc {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 0.85rem;
  }

  .project-tech {
    gap: 0.35rem;
    margin-bottom: 1rem;
  }

  .tech-tag {
    font-size: 0.72rem;
    padding: 2px 6px;
  }

  .contact-box {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .contact-links {
    flex-direction: column;
    width: 100%;
    gap: 0.6rem;
  }

  .contact-link-item {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
    word-break: break-all;
    min-height: 44px;
  }

  .toast-msg {
    bottom: 16px;
    left: 16px;
    right: 16px;
    text-align: center;
    width: auto;
  }

  .footer {
    padding: 2rem 0;
    font-size: 0.82rem;
  }
}

/* Small Smart Phones (<= 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .nav-brand {
    display: none;
  }

  .nav {
    justify-content: space-between;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .project-item {
    padding: 1.1rem;
  }
}

/* Compact Screens (<= 360px) */
@media (max-width: 360px) {
  .nav-links {
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.75rem;
  }

  .hero-title {
    font-size: 1.65rem;
  }
}
