/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Dark mode (default) */
  --bg-primary:       #090d12;
  --bg-secondary:     #111820;
  --bg-panel:         rgba(17, 24, 32, 0.82);
  --bg-panel-strong:  rgba(16, 22, 29, 0.94);
  --text-primary:     #eef4fb;
  --text-secondary:   #aab9c9;
  --line:             rgba(255, 255, 255, 0.11);
  --line-strong:      rgba(255, 255, 255, 0.18);
  --accent:           #7f8cff;
  --accent-soft:      #32d3c8;
  --accent-alt:       #b18cff;
  --shadow-lg:        0 24px 70px rgba(0, 0, 0, 0.45);
  --radius-lg:        24px;
  --radius-md:        18px;
  --radius-sm:        12px;
  --container:        1180px;
  --font-display:     "Space Grotesk", sans-serif;
  --font-body:        "Manrope", sans-serif;
  --nav-h:            72px;
}

/* Light mode overrides (toggled via body class) */
body:not(.dark-mode) {
  --bg-primary:      #eff3f9;
  --bg-secondary:    #ffffff;
  --bg-panel:        rgba(255, 255, 255, 0.82);
  --bg-panel-strong: rgba(255, 255, 255, 0.95);
  --text-primary:    #141b24;
  --text-secondary:  #58677a;
  --line:            rgba(20, 27, 36, 0.10);
  --line-strong:     rgba(20, 27, 36, 0.16);
  --accent:          #4f5bff;
  --accent-soft:     #0f9f94;
  --accent-alt:      #7a56ff;
  --shadow-lg:       0 20px 60px rgba(31, 41, 55, 0.14);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background:
    radial-gradient(circle at top left,    rgba(127, 140, 255, 0.18), transparent 30%),
    radial-gradient(circle at 85% 15%,     rgba(50, 211, 200, 0.18),  transparent 24%),
    linear-gradient(180deg, var(--bg-primary) 0%, #0b1017 100%);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

body:not(.dark-mode) {
  background:
    radial-gradient(circle at top left,  rgba(79, 91, 255, 0.14),    transparent 30%),
    radial-gradient(circle at 85% 15%,   rgba(15, 159, 148, 0.12),   transparent 22%),
    linear-gradient(180deg, #f6f8fc 0%,  #ebf0f7 100%);
}

/* Subtle film-grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

img,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6, p {
  margin-top: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 4.2rem); margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.85rem, 3.6vw, 3rem);   margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: 1rem; }

/* ============================================================
   UTILITY
   ============================================================ */
.container {
  width: min(calc(100% - 2.5rem), var(--container));
  margin-inline: auto;
}

/* ============================================================
   SKIP LINK (accessibility)
   ============================================================ */
.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 11000;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ============================================================
   PARTICLES CANVAS
   ============================================================ */
#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #090d12 0%, #131b25 100%);
  color: #dbe6f4;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Loader animation */
.loader-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader svg {
  animation: loader-rotate 1.6s linear infinite;
}

@keyframes loader-rotate {
  to { transform: rotate(360deg); }
}

.box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  animation: box-pulse 1.4s ease-in-out infinite;
}

@keyframes box-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.8; }
  50%       { transform: scale(1.3); opacity: 1; }
}

/* ============================================================
   SITE HEADER & NAVBAR
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(9, 13, 18, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body:not(.dark-mode) .site-header {
  background: rgba(239, 243, 249, 0.82);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 1.5rem;
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 0 22px rgba(127, 140, 255, 0.32);
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

/* Desktop nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

.nav-links a {
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  width: 100%;
}

/* Theme toggle */
.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle-icon:hover {
  transform: translateY(-2px) rotate(15deg);
  border-color: rgba(127, 140, 255, 0.5);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-primary);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.5rem 1.5rem;
  background: rgba(10, 15, 21, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body:not(.dark-mode) .mobile-nav {
  background: rgba(245, 248, 254, 0.97);
}

.mobile-nav:not([hidden]) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav[hidden] {
  display: flex !important; /* override HTML hidden so CSS handles visibility */
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
}

.mobile-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav a {
  padding: 0.8rem 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease;
}

.mobile-nav a:last-of-type {
  border-bottom: none;
}

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

.mobile-nav button {
  margin-top: 0.75rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 2rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#back-to-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.hero-section,
.section {
  position: relative;
  z-index: 1;
}

.hero-section {
  padding: calc(var(--nav-h) + 72px) 0 88px;
  overflow: hidden;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-top:    1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

body:not(.dark-mode) .section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.4));
}

.section-intro {
  max-width: 760px;
  margin-bottom: 3rem;
}

/* ============================================================
   EYEBROW / LABELS
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 0 6px rgba(50, 211, 200, 0.14);
  animation: dot-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(50, 211, 200, 0.14); }
  50%       { box-shadow: 0 0 0 10px rgba(50, 211, 200, 0.06); }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 460px);
  gap: 3rem;
  align-items: center;
}

/* Hero copy animate – entrance animation */
.hero-copy-animate {
  animation: hero-slide-in 0.8s ease both;
}

@keyframes hero-slide-in {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(50, 211, 200, 0.3);
  background: rgba(50, 211, 200, 0.08);
  color: var(--accent-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.availability-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-soft);
  animation: dot-pulse 2s ease-in-out infinite;
}

/* Mobile identity (visible only on mobile) */
.mobile-identity {
  display: none;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.mobile-identity img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.mobile-identity strong {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
}

.mobile-identity span {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Hero text */
.hero-text {
  color: var(--text-secondary);
  line-height: 1.72;
  font-size: 1rem;
  max-width: 640px;
  margin-bottom: 0;
}

/* Typed line */
.typed-line {
  min-height: 1.6rem;
  margin: 0.5rem 0 1.75rem;
  font-weight: 500;
  font-size: 1.05rem;
}

.typed-text {
  color: var(--accent);
}

/* Hero actions (CTA buttons) */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

/* Shared button styles */
.btn-primary,
.btn-outline,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.93rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 10px 32px rgba(127, 140, 255, 0.28);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(127, 140, 255, 0.38);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--line-strong);
  color: var(--text-primary);
}

.btn-outline:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-secondary {
  background: rgba(127, 140, 255, 0.1);
  border: 1px solid rgba(127, 140, 255, 0.25);
  color: var(--accent);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  background: rgba(127, 140, 255, 0.18);
}

/* Hero metrics */
.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin-bottom: 2rem;
  padding: 0;
  list-style: none;
}

.hero-metrics li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-metrics strong {
  font-size: 1.55rem;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
}

.hero-metrics span {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* Proof strip */
.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.proof-item {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.proof-item span {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.proof-item strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Thank you message */
.thank-you-msg {
  margin: 0.75rem 0 0;
  min-height: 1.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-soft);
  transition: opacity 0.3s ease;
}

/* ============================================================
   HERO CARD (right column)
   ============================================================ */
.hero-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Terminal card */
.terminal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
}

.terminal-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

.copy-terminal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.copy-terminal:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.terminal-body {
  padding: 1.15rem 1.25rem 1.4rem;
  background: rgba(5, 8, 12, 0.82);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

body:not(.dark-mode) .terminal-body {
  background: rgba(235, 240, 248, 0.92);
}

.terminal-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.4rem;
}

.terminal-line:last-child { margin-bottom: 0; }

.prompt {
  color: var(--accent-soft);
  margin-right: 0.5rem;
  user-select: none;
}

.indent {
  display: inline-block;
  width: 18px;
}

.key   { color: #9dc1ff; }
.value { color: #f4ce86; }

body:not(.dark-mode) .key   { color: #3d57d6; }
body:not(.dark-mode) .value { color: #9b5b00; }

.terminal-caret {
  display: inline-block;
  width: 9px;
  height: 16px;
  margin-left: 2px;
  vertical-align: middle;
  border-right: 2px solid var(--accent);
  animation: caret-blink 0.85s step-end infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

/* Hero card footer (3 mini stats below terminal) */
.hero-card-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.hero-card-footer > div {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
}

.hero-card-footer span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.hero-card-footer strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}

.about-copy p {
  color: var(--text-secondary);
  line-height: 1.78;
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.about-copy p:last-child { margin-bottom: 0; }

.about-highlights {
  display: grid;
  gap: 1rem;
}

.highlight-card {
  padding: 1.2rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.highlight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(127, 140, 255, 0.36);
}

.highlight-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.highlight-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
.projects-grid {
  display: grid;
  gap: 1.5rem;
}

.project-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(127, 140, 255, 0.36);
}

.featured-project {
  border-color: rgba(127, 140, 255, 0.28);
}

/* Project preview image */
.project-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

/* Card header */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.project-heading {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.2rem;
}

.project-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(127, 140, 255, 0.14);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
}

.project-kicker {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.2rem;
}

.project-card h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  margin-bottom: 0;
}

.tech-tags {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-summary {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.97rem;
}

/* Project meta boxes */
.project-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.project-meta > div {
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.project-meta span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.project-meta strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Project detail grid (what it solves / what I built) */
.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.project-detail-grid h4 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.project-detail-grid p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0;
}

/* Project bullet points */
.project-points {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: grid;
  gap: 0.55rem;
}

.project-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.project-points li::before {
  content: "→";
  color: var(--accent-soft);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* Project links */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ============================================================
   SKILLS SECTION
   ============================================================ */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.skill-group {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.skill-group:hover {
  transform: translateY(-4px);
  border-color: rgba(127, 140, 255, 0.36);
}

.skill-group h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.skill-group p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0;
}

/* Skills icon grid */
.skills-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.skill-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.2rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.skill-icon:hover {
  transform: translateY(-5px);
  border-color: rgba(127, 140, 255, 0.4);
  background: rgba(127, 140, 255, 0.06);
}

.skill-icon i {
  font-size: 1.9rem;
  color: var(--accent);
}

.skill-icon p {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.3;
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.faq-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.faq-card:hover {
  transform: translateY(-4px);
  border-color: rgba(127, 140, 255, 0.36);
}

.faq-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  color: var(--text-primary);
}

.faq-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-copy {
  padding-top: 0.5rem;
}

.contact-tag {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact-copy p {
  color: var(--text-secondary);
  line-height: 1.72;
  font-size: 0.97rem;
  margin-bottom: 1.5rem;
}

.contact-direct {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.contact-direct a {
  color: var(--accent-soft);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.contact-direct a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Contact form */
.contact-form {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 1.1rem;
}

.contact-form label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  padding: 0.9rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  resize: vertical;
}

body:not(.dark-mode) .contact-form input,
body:not(.dark-mode) .contact-form textarea {
  background: rgba(255, 255, 255, 0.6);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.65;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(127, 140, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(127, 140, 255, 0.12);
  background: rgba(127, 140, 255, 0.04);
}

#contact-submit {
  margin-top: 0.25rem;
  cursor: pointer;
  border: none;
}

.form-status {
  min-height: 1.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0;
  transition: opacity 0.3s ease;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-content p { margin: 0; }

.social-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.social-icons a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   REVEAL ANIMATIONS (scroll-triggered)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero-copy-animate {
    animation: none;
  }
}

/* ============================================================
   RESPONSIVE – TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: none; /* hide right column on tablet/mobile */
  }

  .mobile-identity {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-meta {
    grid-template-columns: 1fr;
  }

  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .skill-groups {
    grid-template-columns: 1fr;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RESPONSIVE – MOBILE (≤ 760px)
   ============================================================ */
@media (max-width: 760px) {
  :root {
    --nav-h: 64px;
  }

  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-section {
    padding-top: calc(var(--nav-h) + 48px);
    padding-bottom: 64px;
  }

  .section {
    padding: 72px 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .hero-metrics {
    gap: 1rem 1.5rem;
  }

  .proof-strip {
    gap: 1rem;
  }

  .project-card {
    padding: 1.5rem;
  }

  .skill-groups {
    grid-template-columns: 1fr;
  }

  .skills-icon-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  #back-to-top {
    right: 1rem;
    bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-metrics strong { font-size: 1.25rem; }
  .skills-icon-grid { grid-template-columns: repeat(3, 1fr); }
  .project-meta { grid-template-columns: 1fr; }
}
