/* ============================================
   ZYDEV PORTFOLIO — WHITE SOFT + DARK MODE
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ---- TOKENS ---- */
:root {
  /* Light (white soft) */
  --bg:          #fafaf8;
  --bg2:         #f4f3ef;
  --bg3:         #eceae4;
  --surface:     #ffffff;
  --border:      rgba(0,0,0,0.08);
  --border-mid:  rgba(0,0,0,0.14);

  --text:        #1a1916;
  --text2:       #4a4845;
  --text3:       #8a8780;

  --accent:      #2d6a4f;       /* forest green */
  --accent-light:#d8f3dc;
  --accent-mid:  #74c69d;
  --accent2:     #e76f51;       /* warm coral */
  --accent2-light:#fde8e0;

  --code-bg:     #f0efeb;
  --code-border: rgba(0,0,0,0.07);

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg:   0 12px 40px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --nav-h: 68px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="dark"] {
  --bg:          #111110;
  --bg2:         #181715;
  --bg3:         #222120;
  --surface:     #1e1d1b;
  --border:      rgba(255,255,255,0.07);
  --border-mid:  rgba(255,255,255,0.13);

  --text:        #f0ede6;
  --text2:       #a09d96;
  --text3:       #5a5854;

  --accent:      #74c69d;
  --accent-light:rgba(116,198,157,0.12);
  --accent-mid:  #52b788;
  --accent2:     #ff8c69;
  --accent2-light:rgba(231,111,81,0.14);

  --code-bg:     #161614;
  --code-border: rgba(255,255,255,0.06);

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:   0 12px 40px rgba(0,0,0,0.5);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ---- LAYOUT ---- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---- CURSOR ---- */
.cursor {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, background 0.2s;
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: all 0.18s ease;
  opacity: 0.5;
}
@media (hover: none) { .cursor, .cursor-ring { display: none; } }

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(250,250,248,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] nav {
  background: rgba(17,17,16,0.85);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text2);
  letter-spacing: 0.04em;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 1rem; }

/* Navbar CTA Button */
.nav-cta {
  border-radius: var(--radius-md) !important; /* 12px rounded corners, "gk full" */
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  align-self: center;
}

/* Theme toggle */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.theme-toggle:hover { border-color: var(--accent); transform: scale(1.05); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }

.btn-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.btn-soft:hover { border-color: var(--accent); transform: translateY(-1px); }

.btn-full { width: 100%; justify-content: center; padding: 0.85rem; font-size: 1rem; }

/* ---- HERO ---- */
.hero {
  padding-top: var(--nav-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #030712;
}

/* Background glows */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  z-index: 1;
}
.hero-glow.top-left {
  top: -10%; left: -10%;
  width: 50%; height: 50%;
  background: rgba(37, 99, 235, 0.08); /* blue-600/8 */
}
.hero-glow.bottom-right {
  bottom: -10%; right: -10%;
  width: 55%; height: 55%;
  background: rgba(79, 70, 229, 0.08); /* indigo-600/8 */
}
.hero-glow.center-purple {
  top: 30%; left: 40%;
  width: 300px; height: 300px;
  background: rgba(147, 51, 234, 0.04); /* purple-600/4 */
}

/* Grid pattern */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 70%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* Hero container grid layout */
.hero-container-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: start;
  padding-top: 4rem;
  padding-bottom: 2rem;
  position: relative;
  z-index: 3;
}

/* Left Content Wrap */
.hero-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-code-editor-wrap {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-top: 1rem;
  animation: float 5s ease-in-out infinite;
}

.hero-code-editor-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1));
  filter: blur(20px);
  opacity: 0.7;
  pointer-events: none;
}

/* Left floating code card height fix */
.hero-code-editor-wrap .code-card {
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}

/* Right side lanyard + id card wrap */
.hero-id-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  min-height: 500px;
  position: relative;
}

.lanyard-card-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  transform-origin: top center;
}

/* Lanyard strap static */
.lanyard-strap-clip {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}

.lanyard-strap {
  width: 14px;
  height: 320px;
  margin-top: -160px;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #1d4ed8);
  position: relative;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.lanyard-texture {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.08) 75%, transparent 75%, transparent);
  background-size: 10px 10px;
  opacity: 0.4;
}

.lanyard-center-line {
  position: absolute;
  top: 0; bottom: 0; left: 6px;
  width: 2px;
  background: rgba(147, 197, 253, 0.3);
}

/* Lanyard Clip assembly */
.lanyard-clip-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -2px;
  position: relative;
  z-index: 11;
}

.lanyard-slider {
  width: 24px;
  height: 20px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.lanyard-metal-loop {
  width: 16px;
  height: 24px;
  margin-top: -2px;
  background: linear-gradient(90deg, #9ca3af, #f3f4f6, #6b7280);
  border-radius: 50%;
  border: 1px solid #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.lanyard-lobster-clip {
  width: 20px;
  height: 32px;
  margin-top: -6px;
  background: linear-gradient(90deg, #9ca3af, #f3f4f6, #6b7280);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  position: relative;
}
.lanyard-lobster-clip::before {
  content: "";
  position: absolute;
  left: 3px; top: 4px;
  width: 1px; height: 16px;
  background: #4b5563;
}
.lanyard-lobster-clip::after {
  content: "";
  position: absolute;
  right: 3px; top: 4px;
  width: 1px; height: 16px;
  background: #d1d5db;
}

/* Badge Envelope (Drops & Swings) */
.badge-envelope {
  width: 280px;
  height: 400px;
  margin-top: -2px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.badge-glass-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, transparent 60%, rgba(168, 85, 247, 0.08) 100%);
  pointer-events: none;
}

.badge-light-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transform: translateX(-100%);
  transition: transform 1.2s ease-out;
  pointer-events: none;
}
.badge-envelope:hover .badge-light-sweep {
  transform: translateX(100%);
}

.badge-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
  position: relative;
  z-index: 2;
}

.badge-slot {
  width: 56px;
  height: 10px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  margin-top: -0.75rem;
  margin-bottom: 0.75rem;
}

.badge-header-info {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

.badge-sec-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text3);
}

.badge-logo-dots {
  display: flex;
  gap: 3px;
}
.logo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.logo-dot.blue { background: #3b82f6; }
.logo-dot.indigo { background: #6366f1; }

.badge-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin: auto 0;
  position: relative;
  z-index: 2;
}

.badge-portrait-container {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.badge-portrait-wrap {
  width: 108px;
  height: 108px;
  background: #181715;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.badge-avatar {
  font-size: 3rem;
  animation: floatAvatar 3s ease-in-out infinite;
}

.badge-active-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #22c55e;
  border: 3px solid #030712;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-active-ping {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: pulse 2s infinite;
}

.badge-details {
  text-align: center;
}

.badge-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.badge-role {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #3b82f6;
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}

.badge-sec-id {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text3);
  margin-top: 0.25rem;
}

.badge-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 2;
}

.badge-barcode-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge-barcode {
  display: flex;
  gap: 1px;
  height: 24px;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px;
  border-radius: 2px;
  max-width: 110px;
}

.b-line {
  background: #000000;
  height: 100%;
}
.b-line.w-1 { width: 1px; }
.b-line.w-2 { width: 2px; }
.b-line.w-3 { width: 3px; }
.b-line.w-4 { width: 4px; }

.badge-barcode-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text3);
  letter-spacing: 0.1em;
}

.badge-chip {
  width: 40px;
  height: 32px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(252, 211, 77, 0.3));
  border: 1px solid rgba(245, 158, 11, 0.3);
  position: relative;
  overflow: hidden;
}

.badge-chip-line-h {
  position: absolute;
  top: 15px; left: 0; right: 0;
  height: 1px;
  background: rgba(245, 158, 11, 0.3);
}

.badge-chip-line-v {
  position: absolute;
  left: 20px; top: 0; bottom: 0;
  width: 1px;
  background: rgba(245, 158, 11, 0.3);
}

/* Animations for Lanyard ID Card */
@keyframes dropIn {
  0% {
    transform: translateY(-900px) rotate(-10deg);
    opacity: 0;
  }
  60% {
    transform: translateY(30px) rotate(4deg);
    opacity: 1;
  }
  80% {
    transform: translateY(-10px) rotate(-2deg);
  }
  90% {
    transform: translateY(4px) rotate(1deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes swing {
  0%, 100% { transform: rotate(-2.5deg); }
  50% { transform: rotate(2.5deg); }
}

.delayed-swing {
  transform-origin: top center;
  animation: 
    dropIn 1.6s cubic-bezier(0.25, 1, 0.5, 1) forwards,
    swing 7s ease-in-out infinite 1.6s;
}

/* Style for Hanging Code Badge */
.badge-envelope.code-badge {
  width: 340px;
  height: 350px;
  margin-top: -24px;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.badge-header-slot {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 8px;
  background: #161B22; /* match window header */
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.badge-envelope.code-badge .badge-slot {
  margin-top: 0;
  margin-bottom: 4px;
}

.badge-envelope.code-badge .code-card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4px 16px 12px;
  background: #161B22;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-envelope.code-badge .window-buttons {
  display: flex;
  gap: 6px;
}

.badge-envelope.code-badge .code-block {
  flex: 1;
  background: #0d1117;
  padding: 20px 24px;
  margin: 0;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  font-size: 13px;
  line-height: 1.65;
  overflow: hidden;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(45,106,79,0.2);
}
[data-theme="dark"] .hero-badge { border-color: rgba(116,198,157,0.25); }
.dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
}
.dot.green { background: #22c55e; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.85)} }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.hero-title em { font-style: italic; color: var(--accent); }
.outline-text {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text3);
}
.hero-desc {
  font-size: 1rem;
  color: var(--text2);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* Code card */
.hero-visual { position: relative; }

/* 3D Flip Card Container */
.flip-card {
  background-color: transparent;
  width: 100%;
  height: 290px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

/* Flip trigger on hover and flipped class */
.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
}

.flip-card-front {
  background: var(--code-bg);
}

.flip-card-back {
  transform: rotateY(180deg);
  background: var(--surface);
  border: 1px solid var(--code-border);
  box-shadow: var(--shadow-lg);
}

.code-card {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 100%;
}

/* Profile Card Back Side */
.profile-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--code-border);
}

.profile-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}

.profile-avatar {
  font-size: 3.2rem;
  margin-bottom: 0.25rem;
  animation: floatAvatar 3s ease-in-out infinite;
}

@keyframes floatAvatar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.1rem;
}

.profile-title {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  border: 1px solid rgba(45, 106, 79, 0.15);
  margin-bottom: 0.8rem;
}

[data-theme="dark"] .profile-status {
  background: var(--accent-light);
  border-color: rgba(116, 198, 157, 0.2);
}

.profile-links .btn-primary {
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.code-card-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--code-border);
}
.code-card-header .dot { width: 12px; height: 12px; }
.file-name {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text3);
}
.code-block {
  padding: 1.25rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text2);
  white-space: pre;
  overflow-x: auto;
}
.c-const { color: #e76f51; }
.c-var   { color: var(--accent); font-weight: 500; }
.c-key   { color: var(--text2); }
.c-str   { color: #2a9d8f; }
.c-bool  { color: #e76f51; }

[data-theme="dark"] .c-str { color: #74c69d; }
[data-theme="dark"] .c-const, [data-theme="dark"] .c-bool { color: #ff8c69; }

.floating-badge {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: float 3s ease-in-out infinite;
}
.badge-top { top: -1rem; right: -1rem; animation-delay: 0s; }
.badge-bot { bottom: -1rem; left: -1rem; animation-delay: 1.5s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* Stats bar */
.hero-stats {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 2rem;
}
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--text);
  line-height: 1;
}
.stat-plus { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent); }
.stat-label { font-size: 0.78rem; color: var(--text3); margin-top: 0.2rem; letter-spacing: 0.04em; }
.stat-divider { width: 1px; height: 40px; background: var(--border-mid); }

/* ---- SECTIONS ---- */
.section { padding: 6rem 0; }
.section-alt { background: var(--bg2); }

.section-header { margin-bottom: 3rem; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 0.6rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-sub {
  font-size: 0.97rem;
  color: var(--text2);
  max-width: 500px;
  line-height: 1.7;
}

/* ---- SKILLS ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.skill-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.skill-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition);
  position: relative;
}
.skill-card:hover .skill-icon {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}
.skill-icon .svg-icon,
.skill-icon img {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
}
.skill-info { flex: 1; min-width: 0; }
.skill-name { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.skill-bar {
  height: 4px;
  background: var(--bg3);
  border-radius: 100px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--accent), var(--accent-mid));
  border-radius: 100px;
  animation: growBar 1.2s cubic-bezier(0.4,0,0.2,1) forwards;
  transform-origin: left;
}
@keyframes growBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.skill-pct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text3);
  min-width: 32px;
  text-align: right;
}

/* ---- PROJECTS ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.project-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--surface), var(--bg2));
}
.project-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-mid));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.project-card:hover .project-accent { transform: scaleX(1); }
.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.project-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
}
.project-year { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text3); }
.project-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.project-desc {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 1.2rem;
  flex: 1;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; }
.tag {
  background: var(--bg3);
  color: var(--text2);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.project-card:hover .tag { border-color: var(--border-mid); }
.project-footer { display: flex; gap: 1rem; }
.project-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  transition: gap var(--transition);
}
.project-link:hover { gap: 0.45rem; }
.project-link span { font-size: 0.9rem; }

/* ---- ABOUT ---- */
.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 5rem;
  align-items: start;
}
.about-photo-wrap { position: relative; width: fit-content; }
.about-photo {
  width: 280px; height: 280px;
  background: var(--bg3);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter var(--transition), transform var(--transition);
}
.about-photo:hover img {
  filter: grayscale(100%);
  transform: scale(1.03);
}
.about-status {
  position: absolute;
  bottom: -0.75rem; right: -0.75rem;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 0.45rem;
  box-shadow: var(--shadow-sm);
}
.about-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.tool-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  transition: all var(--transition);
}
.tool-pill:hover { border-color: var(--accent); color: var(--accent); }

.about-text .section-title { margin-top: 0.5rem; }
.about-text p { color: var(--text2); font-size: 0.95rem; line-height: 1.75; margin-bottom: 1rem; }

/* Timeline */
.timeline { margin-top: 2rem; border-left: 2px solid var(--border-mid); padding-left: 1.5rem; }
.timeline-item {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
}
.timeline-item::before {
  content: '';
  width: 10px; height: 10px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: absolute;
  left: -1.85rem;
  top: 4px;
}
.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  min-width: 90px;
  padding-top: 2px;
}
.timeline-role { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.timeline-place { font-size: 0.8rem; color: var(--text3); margin-top: 0.2rem; }

/* ---- CONTACT ---- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
  margin: 1.5rem 0 2rem;
  transition: gap var(--transition);
}
.contact-email:hover { gap: 0.9rem; }
.email-arrow { font-size: 1.2rem; }

.social-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  color: var(--text2);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text2); }
.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text);
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text3); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(116,198,157,0.12);
}

/* ---- FOOTER ---- */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 0.82rem; color: var(--text3); }
.back-top {
  width: 36px; height: 36px;
  background: var(--bg3);
  border: 1px solid var(--border-mid);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: var(--text2);
  transition: all var(--transition);
}
.back-top:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- SCROLL REVEAL ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---- CERTIFICATES ---- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.cert-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.cert-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.cert-badge-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}
.cert-badge-icon .svg-icon {
  width: 22px;
  height: 22px;
}
.cert-issuer {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text3);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.cert-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}
.cert-desc {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}
.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: auto;
}
.cert-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text3);
}
.cert-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  transition: gap var(--transition);
}
.cert-link:hover {
  gap: 0.4rem;
}
.cert-link span {
  font-size: 0.85rem;
}
.cert-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-mid));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.cert-card:hover .cert-accent {
  transform: scaleX(1);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .hero-container-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-id-card-wrap { order: -1; min-height: auto; margin-bottom: 2.5rem; }
  .floating-badge { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-photo { width: 220px; height: 220px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 3rem; }
  .project-card.featured { grid-column: span 1; }
  nav .nav-links { display: none; }
}
@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }
  .section { padding: 4rem 0; }
  .stats-row { flex-wrap: wrap; gap: 1.5rem; }
  .stat-divider { display: none; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ---- LANGUAGE SELECTOR ---- */
.lang-selector {
  position: relative;
  display: inline-block;
}
.lang-btn {
  height: 40px;
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-mid);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.lang-btn:hover {
  border-color: var(--accent);
  transform: scale(1.03);
}
.lang-current {
  font-weight: 600;
  text-transform: uppercase;
}
.lang-arrow {
  font-size: 0.65rem;
  color: var(--text3);
  transition: transform var(--transition);
}
.lang-selector.active .lang-arrow {
  transform: rotate(180deg);
}
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 200;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.lang-selector.active .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-opt {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text2);
  border: none;
  font-size: 0.82rem;
  font-family: inherit;
  text-align: left;
  transition: all var(--transition);
  width: 100%;
  cursor: pointer;
}
.lang-opt:hover {
  background: var(--accent-light);
  color: var(--accent);
}
.lang-opt.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

