/* ==========================================
   TRAN DAI HIEP — PORTFOLIO
   Light Warm Editorial Theme
   ========================================== */

/* === CSS VARIABLES === */
:root {
  --bg:           #F8F4EE;
  --bg-card:      #F0E9DE;
  --bg-hover:     #E6DDD0;
  --bg-white:     #FDFAF5;
  --amber:        #B05E0A;
  --amber-light:  #CC7828;
  --amber-pale:   #EAD09A;
  --amber-glow:   rgba(176, 94, 10, 0.10);
  --ink:          #1C1408;
  --ink-mid:      #4E3C26;
  --ink-dim:      #886858;
  --border:       #D9CFC0;
  --border-light: #C2B49E;
  --shadow-sm:    0 2px 8px rgba(28, 20, 8, 0.07);
  --shadow-md:    0 8px 32px rgba(28, 20, 8, 0.10);
  --shadow-lg:    0 20px 64px rgba(28, 20, 8, 0.12);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;
  --font-body:    'Source Serif 4', Georgia, serif;
  --section-gap:  9rem;
  --container:    1180px;
  --radius:       2px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}
@media (hover: hover) { body { cursor: none; } }
::selection { background: var(--amber-pale); color: var(--ink); }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; font-weight: 700; }
a { color: var(--amber); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--amber-light); }
img { max-width: 100%; display: block; }

/* === CUSTOM CURSOR === */
.cursor, .cursor-follower { display: none; }
@media (hover: hover) {
  /* Hide native cursor on all elements */
  *, *::before, *::after { cursor: none !important; }
  .cursor {
    display: block;
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--amber);
    border-radius: 50%;
    pointer-events: none !important;
    z-index: 9999;
    top: 0; left: 0;
    opacity: 0;
    will-change: transform;
    /* No CSS transform — GSAP handles centering via xPercent/yPercent */
  }
  .cursor-follower {
    display: block;
    position: fixed;
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--amber);
    border-radius: 50%;
    pointer-events: none !important;
    z-index: 9998;
    top: 0; left: 0;
    opacity: 0;
    will-change: transform;
  }
}

/* === LAYOUT === */
.container { max-width: var(--container); margin: 0 auto; padding: 0 2.5rem; }
section { padding: var(--section-gap) 0; position: relative; }

/* === SECTION METADATA === */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: '';
  width: 1.8rem;
  height: 1px;
  background: var(--amber);
  flex-shrink: 0;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4rem;
}
.section-title em { color: var(--amber); font-style: italic; }

/* === NAVIGATION === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.6rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}
nav.scrolled {
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 2.5rem;
  box-shadow: var(--shadow-sm);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.03em;
}
.nav-logo em { color: var(--amber); font-style: normal; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links a:hover { color: var(--amber); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--border);
  color: var(--ink-mid);
  padding: 0.4rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: var(--radius);
}
.nav-toggle:hover { border-color: var(--amber); color: var(--amber); }

/* === HERO === */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 2rem;
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
}
/* Gradient orbs background */
#hero::before {
  content: '';
  position: absolute;
  top: -15%; right: -8%;
  width: 55vw; height: 55vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176, 94, 10, 0.07) 0%, transparent 65%);
  pointer-events: none;
  animation: orb1 10s ease-in-out infinite;
}
#hero::after {
  content: '';
  position: absolute;
  bottom: -12%; left: -6%;
  width: 38vw; height: 38vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176, 94, 10, 0.05) 0%, transparent 70%);
  pointer-events: none;
  animation: orb1 13s ease-in-out infinite reverse;
}
@keyframes orb1 {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.06) translate(12px, -8px); }
}

.hero-content { padding: 0 2.5rem; max-width: 660px; position: relative; z-index: 2; }
.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.hero-tag::before { content: ''; width: 2.2rem; height: 1px; background: var(--amber); }
.hero-name {
  font-size: clamp(4rem, 7.5vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: 1.4rem;
}
.hero-name .line-1 { display: block; color: var(--ink); }
.hero-name .line-2 { display: block; color: var(--amber); font-style: italic; padding-left: 0.04em; }

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  color: var(--ink-dim);
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.6em;
}
#typed-role { color: var(--amber-light); }
.typed-cursor { color: var(--amber) !important; }

.hero-divider { width: 3rem; height: 1px; background: var(--border-light); margin-bottom: 1.8rem; }

.hero-description {
  font-size: 1.02rem;
  color: var(--ink-mid);
  line-height: 1.95;
  margin-bottom: 2.8rem;
  max-width: 460px;
}
.hero-description strong { color: var(--ink); font-weight: 600; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 0.82rem 2.1rem;
  background: var(--amber);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
  will-change: transform;
}
.btn-primary:hover { background: var(--amber-light); color: #fff; box-shadow: 0 8px 24px rgba(176, 94, 10, 0.28); }
.btn-secondary {
  display: inline-block;
  padding: 0.82rem 2.1rem;
  background: transparent;
  color: var(--ink-mid);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
  will-change: transform;
}
.btn-secondary:hover { border-color: var(--amber); color: var(--amber); }

/* Hero Right Visual */
.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 2.5rem;
}
.hero-ring-wrap {
  position: relative;
  width: 360px;
  height: 360px;
  flex-shrink: 0;
}
.h-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
}
.h-ring.r1 {
  inset: 0;
  border-color: rgba(176, 94, 10, 0.14);
  animation: rotateCW 35s linear infinite;
}
.h-ring.r2 {
  inset: 42px;
  border-color: rgba(176, 94, 10, 0.10);
  animation: rotateCCW 25s linear infinite;
}
.h-ring.r3 {
  inset: 88px;
  border-color: rgba(176, 94, 10, 0.20);
  background: radial-gradient(circle, rgba(176, 94, 10, 0.05) 0%, transparent 80%);
}
.h-ring-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.5;
}
.hero-center {
  position: absolute;
  inset: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-center-num {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}
.hero-center-lbl {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 0.25rem;
}
.h-badge {
  position: absolute;
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: var(--ink-mid);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  border-radius: 100px;
  animation: floatBadge 4s ease-in-out infinite;
}
.h-badge.b1 { top: 5px; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.h-badge.b2 { top: 50%; right: -5px; transform: translateY(-50%); animation-delay: 1s; }
.h-badge.b3 { bottom: 5px; left: 50%; transform: translateX(-50%); animation-delay: 2s; }
.h-badge.b4 { top: 50%; left: -5px; transform: translateY(-50%); animation-delay: 3s; }

@keyframes rotateCW { to { transform: rotate(360deg); } }
@keyframes rotateCCW { to { transform: rotate(-360deg); } }
@keyframes floatBadge {
  0%, 100% { box-shadow: var(--shadow-sm); }
  50% { box-shadow: 0 6px 20px rgba(176, 94, 10, 0.15); }
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  z-index: 2;
}
.hero-scroll-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, var(--border-light), transparent);
  animation: scrollLine 2.5s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* === ABOUT === */
.about-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 7rem;
  align-items: start;
}
.about-image-col { position: sticky; top: 7rem; }
.about-img-frame { position: relative; width: 100%; }
.about-img-frame::before {
  content: '';
  position: absolute;
  top: -12px; left: -12px; right: 12px; bottom: 12px;
  border: 1px solid var(--amber);
  opacity: 0.35;
  z-index: 0;
  transition: opacity 0.4s;
}
.about-img-frame:hover::before { opacity: 0.75; }
.about-img-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(176, 94, 10, 0.18) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}
.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  display: block;
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  filter: saturate(0.88) contrast(1.06);
  transition: filter 0.5s;
}
.about-img-frame:hover .about-photo { filter: saturate(1.08) contrast(1.06); }
.about-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--amber);
  opacity: 0.5;
}
.about-bio {
  font-size: 1.06rem;
  line-height: 1.95;
  color: var(--ink-mid);
  margin-bottom: 2.5rem;
}
.about-bio strong { color: var(--ink); font-weight: 600; }
.about-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 3rem;
}
.info-block {
  padding: 0.95rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.info-block:hover { border-color: var(--amber); box-shadow: var(--shadow-sm); }
.info-block .lbl {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.2rem;
}
.info-block .val { font-size: 0.88rem; color: var(--ink); font-weight: 500; }
.info-block .val a { color: var(--amber); }
.about-stats { display: flex; gap: 2.8rem; flex-wrap: wrap; }
.about-stat .num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  display: block;
}
.about-stat .desc {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* === SKILLS === */
#skills { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.skills-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; }
.skill-cat { margin-bottom: 3.2rem; }
.cat-lbl {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.8rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}
.skill-row { margin-bottom: 1.5rem; }
.skill-row-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.45rem; }
.skill-name { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink); }
.skill-score { font-family: var(--font-mono); font-size: 0.6rem; color: var(--ink-dim); }
.skill-track { height: 2px; background: var(--border); overflow: hidden; border-radius: 1px; }
.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--amber), var(--amber-light));
  border-radius: 1px;
}
.chip-cloud { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip {
  padding: 0.28rem 0.72rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
  border-radius: 100px;
  transition: all 0.25s;
  cursor: default;
}
.chip:hover { border-color: var(--amber); color: var(--amber); background: rgba(176, 94, 10, 0.04); }

/* === EDUCATION === */
#education { background: var(--bg); }
.edu-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 4rem;
  padding: 2.5rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.edu-card:hover { border-color: var(--amber); box-shadow: var(--shadow-md); }
.edu-year { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em; color: var(--amber); text-transform: uppercase; }
.edu-school { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: var(--ink); margin-bottom: 0.25rem; line-height: 1.2; }
.edu-major { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-dim); letter-spacing: 0.04em; margin-bottom: 0.7rem; }
.edu-detail { font-size: 0.92rem; color: var(--ink-mid); }
.edu-badge {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.3rem 0.85rem;
  background: rgba(176, 94, 10, 0.08);
  border: 1px solid rgba(176, 94, 10, 0.22);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--amber);
  border-radius: 100px;
}

/* === EXPERIENCE === */
#experience { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.timeline { position: relative; padding-left: 3rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--amber) 0%, var(--border) 100%);
}
.tl-item { position: relative; margin-bottom: 3.8rem; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -3rem;
  top: 5px;
  width: 9px; height: 9px;
  border: 1.5px solid var(--amber);
  background: var(--bg-card);
  transform: rotate(45deg);
  margin-left: -4px;
  transition: background 0.3s;
}
.tl-item.active::before { background: var(--amber); }
.tl-item:hover::before { background: var(--amber-pale); }
.tl-date { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); margin-bottom: 0.3rem; }
.tl-company { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--ink); margin-bottom: 0.15rem; }
.tl-role { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-dim); letter-spacing: 0.04em; margin-bottom: 0.8rem; }
.tl-desc { font-size: 0.93rem; color: var(--ink-mid); line-height: 1.85; }
.tl-desc ul { list-style: none; padding: 0; margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.tl-desc li { padding-left: 1rem; position: relative; }
.tl-desc li::before { content: '—'; position: absolute; left: 0; color: var(--amber); font-size: 0.85rem; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 0.42rem; margin-top: 0.9rem; }
.tl-tag {
  padding: 0.22rem 0.65rem;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
  border-radius: 100px;
  background: var(--bg);
  transition: all 0.25s;
}
.tl-tag:hover { border-color: var(--amber); color: var(--amber); }

/* === PROJECTS === */
#projects { background: var(--bg); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, box-shadow 0.35s;
  transform-style: preserve-3d;
  will-change: transform;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--amber), var(--amber-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-card:hover { border-color: var(--amber); box-shadow: var(--shadow-md); }
.project-card:hover::before { transform: scaleX(1); }
.project-num { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.25em; color: var(--amber); opacity: 0.55; margin-bottom: 1.1rem; }
.project-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--ink); margin-bottom: 0.2rem; line-height: 1.1; }
.project-platform { font-family: var(--font-mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-dim); margin-bottom: 0.9rem; }
.project-desc { font-size: 0.88rem; color: var(--ink-mid); line-height: 1.8; }
.project-techs { display: flex; flex-wrap: wrap; gap: 0.38rem; margin-top: 0.9rem; }
.p-tag {
  padding: 0.18rem 0.52rem;
  background: rgba(176, 94, 10, 0.07);
  border: 1px solid rgba(176, 94, 10, 0.18);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--amber);
  border-radius: 100px;
}
.project-links { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.2rem; }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  position: relative;
}
.project-link::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.project-link:hover::after { transform: scaleX(1); }
.project-link:hover { color: var(--amber-light); }

/* === OPEN SOURCE === */
#opensource { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.os-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.os-card {
  padding: 1.8rem 2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.os-card::after {
  content: '</>';
  position: absolute;
  top: -0.3rem; right: 1rem;
  font-family: var(--font-mono);
  font-size: 3.2rem;
  color: var(--border);
  line-height: 1;
  pointer-events: none;
  transition: color 0.3s;
}
.os-card:hover { border-color: var(--amber); box-shadow: var(--shadow-sm); }
.os-card:hover::after { color: rgba(176, 94, 10, 0.10); }
.os-name { font-family: var(--font-mono); font-size: 0.8rem; color: var(--amber); margin-bottom: 0.45rem; position: relative; }
.os-desc { font-size: 0.87rem; color: var(--ink-mid); line-height: 1.75; position: relative; }
.os-link {
  display: inline-block;
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  text-transform: uppercase;
  position: relative;
}
.os-link::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.os-link:hover::after { transform: scaleX(1); }

/* === AWARDS === */
#awards { background: var(--bg); }
.award-row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 2.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  transition: padding-left 0.3s;
}
.award-row:first-child { border-top: 1px solid var(--border); }
.award-row:hover { padding-left: 0.5rem; }
.award-yr { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; color: var(--border-light); line-height: 1; transition: color 0.3s; padding-top: 0.1rem; }
.award-row:hover .award-yr { color: var(--amber); }
.award-title { font-size: 1rem; font-weight: 500; color: var(--ink); margin-bottom: 0.2rem; }
.award-org { font-family: var(--font-mono); font-size: 0.62rem; color: var(--ink-dim); letter-spacing: 0.03em; }

/* === CONTACT === */
#contact { background: var(--bg-card); border-top: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; }
.contact-lead { font-size: 1.03rem; color: var(--ink-mid); line-height: 1.95; margin-bottom: 2.8rem; }
.c-info-list { display: flex; flex-direction: column; gap: 0.9rem; }
.c-info-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.95rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.c-info-item:hover { border-color: var(--amber); box-shadow: var(--shadow-sm); }
.c-icon { width: 1.8rem; text-align: center; color: var(--amber); font-size: 0.95rem; flex-shrink: 0; }
.c-lbl { font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--amber); margin-bottom: 0.12rem; }
.c-val { font-size: 0.88rem; color: var(--ink); }
.c-val a { color: var(--ink); transition: color 0.3s; }
.c-val a:hover { color: var(--amber); }

.contact-form-col {}
.contact-form { display: flex; flex-direction: column; gap: 1.3rem; }
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.f-label { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); }
.f-input, .f-textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.78rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
  width: 100%;
}
.f-input::placeholder, .f-textarea::placeholder { color: var(--ink-dim); opacity: 0.45; }
.f-input:focus, .f-textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(176, 94, 10, 0.07); }
.f-textarea { min-height: 7.5rem; resize: vertical; }

/* === FOOTER === */
footer {
  padding: 1.8rem 2.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}
.footer-copy { font-family: var(--font-mono); font-size: 0.62rem; color: var(--ink-dim); letter-spacing: 0.05em; }
.footer-nav { display: flex; gap: 2rem; list-style: none; }
.footer-nav a { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); transition: color 0.3s; }
.footer-nav a:hover { color: var(--amber); }

/* === RESPONSIVE === */
@media (max-width: 1100px) {
  #hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 280px 1fr; gap: 4rem; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --section-gap: 6rem; }
  nav { padding: 1.1rem 1.5rem; }
  nav.scrolled { padding: 0.7rem 1.5rem; }
  .nav-links {
    display: block;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(300px, 85vw);
    background: var(--bg-white);
    border-left: 1px solid var(--border);
    padding: 5rem 1.8rem 2rem;
    z-index: 150;
    box-shadow: -8px 0 40px rgba(28, 20, 8, 0.10);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { margin-bottom: 1.5rem; }
  .nav-links a { font-size: 0.85rem; }
  .nav-toggle { display: block; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-image-col { position: static; max-width: 220px; }
  .skills-2col, .os-grid, .contact-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-info-grid { grid-template-columns: 1fr; }
  .edu-card { grid-template-columns: 1fr; gap: 0.8rem; padding: 1.8rem; }
  footer { flex-direction: column; gap: 1.2rem; text-align: center; }
  .contact-grid { gap: 3.5rem; }
  .award-row { grid-template-columns: 4rem 1fr; gap: 1.5rem; }
  .award-yr { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  .hero-name { font-size: 3rem; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { text-align: center; width: 100%; }
  .footer-nav { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .container { padding: 0 1.5rem; }
}

/* =====================================================
   DARK THEME
   ===================================================== */
[data-theme="dark"] {
  --bg:           #0E0C09;
  --bg-card:      #161310;
  --bg-hover:     #1F1B15;
  --bg-white:     #111009;
  --amber:        #D49830;
  --amber-light:  #E8B040;
  --amber-pale:   #5A3A08;
  --amber-glow:   rgba(212, 152, 48, 0.12);
  --ink:          #EDE4D4;
  --ink-mid:      #B09878;
  --ink-dim:      #7A6040;
  --border:       #292218;
  --border-light: #3C3025;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.28);
  --shadow-md:    0 8px 32px rgba(0,0,0,.40);
  --shadow-lg:    0 20px 64px rgba(0,0,0,.55);
}
[data-theme="dark"] nav.scrolled {
  background: rgba(14,12,9,.92);
}
[data-theme="dark"] .hero-visual::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(212,152,48,.10) 0%, transparent 70%);
}
[data-theme="dark"] .tl-item::before { background: var(--border); }
[data-theme="dark"] .tl-item.active::before { background: var(--amber); }
[data-theme="dark"] .about-img-frame::before { border-color: var(--amber); }
[data-theme="dark"] .edu-badge { background: rgba(212,152,48,.15); color: var(--amber); }
[data-theme="dark"] .nav-links { background: var(--bg-white); }

/* Smooth color transitions on theme change */
html { transition: none; }
body, nav, section, footer, .project-card, .os-card, .edu-card,
.tl-item, .award-row, .c-info-item, .f-input, .f-textarea,
.skill-track, .chip, .tl-tag, .p-tag, .about-img-frame, .h-badge {
  transition: background-color 0.40s ease, border-color 0.40s ease,
              color 0.40s ease, box-shadow 0.40s ease;
}

/* =====================================================
   THEME TOGGLE BUTTON + NAV-END
   ===================================================== */
.nav-end {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.theme-btn {
  background: transparent;
  border: 1.5px solid var(--border-light);
  color: var(--ink-mid);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
  transition: border-color 0.3s, color 0.3s, transform 0.4s ease;
  flex-shrink: 0;
}
.theme-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: rotate(25deg) scale(1.1);
}
.t-icon { display: block; line-height: 1; }

/* =====================================================
   THREE.JS HERO 3D WRAP
   ===================================================== */
.hero-3d-wrap {
  position: relative;
  width: 360px;
  height: 360px;
  flex-shrink: 0;
}
#three-canvas {
  position: relative;
  z-index: 1;
  width: 360px !important;
  height: 360px !important;
  border-radius: 50%;
}
/* Badges still use the existing .h-badge styles — they attach to hero-3d-wrap */
.hero-3d-wrap .h-badge { position: absolute; }

/* =====================================================
   SWIPER OVERRIDES (Projects Carousel)
   ===================================================== */
.projects-swiper {
  padding: 1rem 0.25rem 3.5rem !important;
  overflow: visible !important;
}
.projects-swiper .swiper-wrapper { align-items: stretch; }
.projects-swiper .swiper-slide { height: auto; }
.projects-swiper .swiper-slide .project-card { height: 100%; }
.swiper-pagination-bullet {
  background: var(--border-light);
  opacity: 1;
}
.swiper-pagination-bullet-active {
  background: var(--amber) !important;
  width: 20px !important;
  border-radius: 4px !important;
}
.swiper-button-next,
.swiper-button-prev {
  color: var(--amber) !important;
  width: 2.4rem !important;
  height: 2.4rem !important;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  top: 40% !important;
}
.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 0.75rem !important;
  font-weight: 700;
}
.swiper-button-disabled { opacity: 0.3 !important; }

/* =====================================================
   DARK MODE — NAV SCROLLED
   ===================================================== */
@media (max-width: 768px) {
  .hero-3d-wrap { width: 260px; height: 260px; }
  #three-canvas { width: 260px !important; height: 260px !important; }
}
