/* ===================================
   AYUSH MISRA — PORTFOLIO
   Design: deepikarao.co.in inspired
   =================================== */

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

:root {
  --bg: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-tertiary: #efefef;
  --border: #e2e2e2;
  --border-dark: #cccccc;
  --text: #0d0d0d;
  --text-muted: #555555;
  --text-faint: #999999;
  --accent: #000000;
  --green: #16a34a;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --max-w: 1100px;
  --px: clamp(1.5rem, 5vw, 3.5rem);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
canvas { display: block; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* ===== TYPOGRAPHY ===== */
.text-display { font-size: clamp(2.8rem, 7vw, 5rem); }
.text-h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
.text-h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.text-h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 1.25rem var(--px);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-color: var(--border); }
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  position: relative;
}
.nav-logo::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--text);
  transition: width 0.25s ease;
}
.nav-logo:hover::after { width: 100%; }

/* Mobile Hamburger Toggle Button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
  border-radius: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.nav-item { display: flex; align-items: center; gap: 1rem; }
.nav-item a { color: var(--text-muted); transition: color 0.2s; position: relative; font-weight: 500; }
.nav-item a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--text);
  transition: width 0.25s ease;
}
.nav-item a:hover { color: var(--text); }
.nav-item a:hover::after { width: 100%; }
.dot { color: var(--text-faint); }
.nav-item.last .dot { display: none; }

/* ===== HERO ===== */
.hero {
  padding: 5rem var(--px) 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: min(38rem, 86vw);
  height: min(38rem, 86vw);
  top: -8rem;
  right: -10rem;
  background: radial-gradient(circle, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0.12) 28%, rgba(0,0,0,0) 72%);
  filter: blur(36px);
  animation: heroDrift 3.2s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
  animation: heroSweep 2.2s ease-in-out infinite;
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: heroReveal 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.25rem;
  width: min(320px, 100%);
}
.hero-visual lottie-player {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.hero-greeting,
.hero-headline,
.hero-sub,
.hero-cta {
  will-change: transform, opacity;
}

.hero-greeting {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.name-highlight { color: var(--text); font-weight: 600; }

.hero-headline {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  max-width: 920px;
  margin-bottom: 1.75rem;
  animation: titleFloat 2.2s ease-in-out infinite alternate;
  text-shadow: 0 0 0 transparent;
}
.hero-headline .block { display: block; }

.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  align-items: center;
}
.cta-primary {
  color: var(--text);
  font-weight: 600;
  position: relative;
}
.cta-primary::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1.5px;
  background: var(--text);
  transform-origin: left;
  animation: underlinePulse 1.6s ease-in-out infinite alternate;
}
.cta-secondary { color: var(--text-muted); transition: color 0.2s; cursor: pointer; }
.cta-secondary:hover { color: var(--text); }

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2rem, 1.8rem, 0) scale(1.1); }
}

@keyframes heroSweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes titleFloat {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-6px) scale(1.01); }
}

@keyframes underlinePulse {
  0% { transform: scaleX(0.96); opacity: 0.8; }
  100% { transform: scaleX(1.04); opacity: 1; }
}

/* Roll animation on copy */
.roll { position: relative; display: inline-block; overflow: hidden; }
.roll-main, .roll-alt {
  display: block;
  transition: transform 0.3s ease;
}
.roll-alt {
  position: absolute;
  top: 100%; left: 0;
  color: var(--green);
}
.roll[data-copied="true"] .roll-main { transform: translateY(-100%); }
.roll[data-copied="true"] .roll-alt { transform: translateY(-100%); }

.arrow { display: inline-block; margin-left: 0.2em; transition: transform 0.2s; }
a:hover .arrow { transform: translateX(3px); }

/* ===== PROJECT ARTICLES ===== */
.project-article {
  border-top: 1px solid var(--border);
  padding: 4rem var(--px);
}
.project-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.proj-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.proj-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 0.75rem;
  max-width: 760px;
}
.proj-sub {
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2rem;
}
.proj-media {
  max-width: 900px;
  aspect-ratio: 1800/800;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 2.5rem;
  background: var(--bg-secondary);
}
.proj-media-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.code-preview {
  background: #18181c;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}
.code-lines { color: #d4d4d4; }
.cl-purple { color: #c792ea; }
.cl-yellow { color: #ffcb6b; }
.cl-blue { color: #82aaff; }
.cl-green { color: #c3e88d; }
.cl-muted { color: #6e7681; }

.proj-body {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.proj-body p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
}
.proj-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.proj-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--text);
}

/* ===== GALLERY ===== */
.gallery-section, .timeline-section {
  border-top: 1px solid var(--border);
  padding: 4rem var(--px);
}
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 3rem;
  max-width: 760px;
}
.section-desc {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 3rem;
  margin-top: -2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 3rem 1.5rem;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-card { display: block; }
.card-frame {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  transition: border-color 0.25s;
}
.gallery-card:hover .card-frame { border-color: #333; }
.card-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  transition: opacity 0.25s;
}
.gallery-card:hover .card-bg { opacity: 0.8; }
.card-bg svg { width: 100%; max-width: 100px; }
.card-bg-blue { background: rgba(30,58,138,0.2); }
.card-bg-amber { background: rgba(92,50,5,0.2); }
.card-bg-purple { background: rgba(46,8,84,0.2); }
.card-bg-green { background: rgba(2,44,34,0.2); }
.card-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.card-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.card-tags {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== BENTO BOX FREELANCE GRID ===== */
.freelance-section {
  border-top: 1px solid var(--border);
  padding: 5rem var(--px);
  background: var(--bg);
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 860px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

.bento-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  overflow: hidden;
}
.bento-card:hover {
  border-color: var(--border-dark);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Featured Full-Width Bento Card */
.bento-card-featured {
  grid-column: 1 / -1;
}
@media (min-width: 860px) {
  .bento-card-featured {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 2rem;
    align-items: center;
  }
}

.bento-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.bento-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border-dark);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bento-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.bento-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.bento-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.bento-tech {
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bento-link {
  color: var(--text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
}
.bento-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--text);
}

/* Browser mockup inside Bento Card */
.bento-browser {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  margin-top: 1rem;
}
.bento-card-featured .bento-browser {
  margin-top: 0;
}
.browser-chrome {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.85rem;
  background: #f1f1f4;
  border-bottom: 1px solid var(--border);
}
.browser-dots { display: flex; gap: 0.3rem; }
.browser-dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #ccc;
}
.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }
.browser-url {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid #e2e2e5;
  border-radius: 4px;
  padding: 2px 8px;
  flex: 1;
  text-align: center;
  letter-spacing: 0.02em;
}
.browser-frame {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #ffffff;
}
.browser-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
}

/* ===== ACHIEVEMENTS SECTION ===== */
.achievements-section {
  border-top: 1px solid var(--border);
  padding: 4rem var(--px);
  background: #ffffff;
}
.achievement-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  background: var(--bg-secondary);
  box-shadow: 0 4px 24px rgba(0,0,0,0.03);
}
@media (min-width: 860px) {
  .achievement-card {
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
  }
}
.achieve-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #000;
  background: #ffffff;
  border: 1px solid var(--border-dark);
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}
.achieve-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.achieve-sub {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.achieve-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.achieve-media {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  background: #000;
}
.achieve-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ===== TIMELINE ===== */
.timeline { list-style: none; }
.tl-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
}
@media (min-width: 768px) {
  .tl-item { grid-template-columns: 180px 1fr; }
}
.tl-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 2px;
  white-space: nowrap;
}
.tl-role {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.tl-org { font-weight: 400; color: var(--text-muted); }
.tl-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 62ch;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 5rem var(--px) 4rem;
  margin-top: 6rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 4rem;
  align-items: flex-start;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.footer-name { color: var(--text); margin-bottom: 0.5rem; }
.footer-copy { color: var(--text-faint); }
.footer-contact { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-email-wrap { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); }
.footer-link { transition: color 0.2s; }
.footer-link:hover { color: var(--text); }
.footer-resume { color: var(--text-muted); }

.footer-social { position: relative; }
.social-links { display: flex; flex-direction: column; gap: 0.65rem; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.social-link:hover { color: var(--text); }

.peek-tooltip {
  position: absolute;
  left: 100%;
  top: 0;
  margin-left: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
}
.peek-tooltip.visible {
  opacity: 1;
  transform: translateX(0);
}

.footer-colophon { max-width: 200px; line-height: 1.65; }
.footer-colophon-label { color: var(--text-faint); margin-bottom: 0.5rem; }
.inline-link { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.inline-link:hover { color: var(--text); }

/* ===== REVEAL ANIMATION (Visibility Safe) ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js-reveal-enabled .reveal {
  opacity: 0;
  transform: translateY(20px);
}
.js-reveal-enabled .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Badges & Indicators */
.badge-wip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== MOBILE & RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem var(--px);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  }
  .nav-links.open { display: flex; }
  .nav-item { gap: 0; width: 100%; }
  .nav-item a { font-size: 0.9rem; padding: 0.25rem 0; width: 100%; }
  .dot { display: none; }

  .hero { padding: 2.5rem var(--px) 2rem; }
  .hero-headline { font-size: clamp(2.1rem, 7.5vw, 3.2rem); line-height: 1.1; }
  .hero-sub { font-size: 0.95rem; margin-bottom: 2rem; }

  .project-article { padding: 2.5rem var(--px); }
  .proj-title { font-size: 1.5rem; }
  .proj-sub { font-size: 0.95rem; }
  
  /* CODE PREVIEW MOBILE OVERFLOW FIX */
  .proj-media {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 160px;
    aspect-ratio: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
  }
  .proj-media-placeholder {
    padding: 1rem 1.25rem;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .code-preview {
    width: 100%;
    font-size: 0.72rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .achievements-section, .gallery-section, .freelance-section, .timeline-section { padding: 2.5rem var(--px); }
  .achievement-card { padding: 1.5rem; gap: 1.5rem; }
  .achieve-stats { flex-wrap: wrap; gap: 1.25rem; }
  .stat-val { font-size: 1.25rem; }

  .bento-grid { gap: 1.25rem; }
  .bento-card { padding: 1.25rem; border-radius: 10px; }
  .bento-card-featured { grid-template-columns: 1fr; }
  .bento-title { font-size: 1.15rem; }
  .bento-desc { font-size: 0.85rem; }
  .browser-frame { height: 200px; }

  .footer-inner { flex-direction: column; gap: 2rem; }
}
.page-main {
  padding: 2rem var(--px) 6rem;
}
.page-inner {
  max-width: 860px;
  margin: 0 auto;
}
.page-hero-image {
  aspect-ratio: 1200/420;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.page-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.page-h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.page-intro {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 3rem;
}
.page-section { margin-bottom: 3rem; }
.page-section-title {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1rem;
}
.page-section p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  max-width: 640px;
  margin-bottom: 1.25rem;
}
.page-cta {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.page-cta a {
  color: var(--text);
  position: relative;
}
.page-cta a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--text);
}

/* ===== ABOUT PAGE ===== */
.about-grid {
  display: grid;
  gap: 3rem;
}
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 1fr 340px; gap: 4rem; }
}
.about-image {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3/4;
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }

/* ===== RESUME PAGE ===== */
.resume-section {
  padding: 2rem var(--px) 6rem;
}
.resume-inner { max-width: 860px; margin: 0 auto; }
.resume-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}
.resume-name { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.resume-title { font-size: 1rem; color: var(--text-muted); margin-bottom: 1rem; }
.resume-contacts {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted);
}
.resume-contacts a:hover { color: var(--text); }
.resume-block { margin-bottom: 2.5rem; }
.resume-block-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.resume-entry { margin-bottom: 1.5rem; }
.resume-entry-header {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 0.3rem;
}
.resume-entry-title { font-weight: 500; color: var(--text); }
.resume-entry-date {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); white-space: nowrap;
}
.resume-entry-org { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.resume-entry-desc { font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); }
.resume-skills {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  letter-spacing: 0.04em;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  margin-bottom: 2.5rem;
  transition: background 0.2s, border-color 0.2s;
}
.download-btn:hover { background: var(--bg-secondary); border-color: #333; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero { padding: 3rem var(--px) 2.5rem; }
  .project-article { padding: 2.5rem var(--px); }
  .gallery-section, .freelance-section, .timeline-section { padding: 2.5rem var(--px); }
  .nav-links { gap: 0.75rem; }
  .dot { display: none; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card-featured { grid-column: auto; }
  .browser-frame { height: 180px; }
}

/* ===== NOSCRIPT ===== */
.noscript-char {
  font-size: 4rem;
  margin-bottom: 1rem;
}
