/* ===========================
   TOKENS & RESET
=========================== */
:root {
  --bg:         #0d1117;
  --surface:    #161b23;
  --surface-2:  #1e2530;
  --border:     #ffffff12;
  --border-hi:  #ffffff22;
  --accent:     #2dd4bf;        /* teal-green */
  --accent-dim: #2dd4bf22;
  --accent-mid: #2dd4bf55;
  --text:       #e8edf3;
  --text-muted: #8892a0;
  --text-dim:   #4a5568;
  --radius:     12px;
  --radius-lg:  20px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

/* ===========================
   NAV
=========================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 4vw;
  background: rgba(13, 17, 23, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-resume-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-mid);
  border-radius: 6px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.nav-resume-btn:hover { background: var(--accent-mid); border-color: var(--accent); }

/* ===========================
   HERO
=========================== */
#hero {
  min-height: 100svh;
  padding: 7rem 4vw 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* subtle radial glow */
#hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(ellipse at 15% 20%, #2dd4bf18 0%, transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}

.dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
  50%       { opacity: 0.5; box-shadow: 0 0 16px var(--accent); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 0.8rem;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.15s ease both;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: fadeUp 0.6s 0.25s ease both;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  animation: fadeUp 0.6s 0.35s ease both;
}

.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-hi);
}

/* PHOTO */
.hero-photo-col {
  position: relative;
  animation: fadeUp 0.7s 0.3s ease both;
}

.photo-frame {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.photo-tag {
  position: absolute;
  bottom: 1.2rem; left: 1.2rem;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.accent-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
}

.floating-card {
  position: absolute;
  background: rgba(22, 27, 35, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.card-1 { top: -1rem; right: -2rem; animation: float 4s ease-in-out infinite; }
.card-2 { bottom: 4rem; right: -2.5rem; animation: float 4s 2s ease-in-out infinite; }

.card-icon { font-size: 1.2rem; }
.card-title { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); }
.card-sub   { font-weight: 500; }

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

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  animation: fadeUp 1s 0.8s ease both;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2s ease infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* ===========================
   SHARED SECTION STYLES
=========================== */
.accent { color: var(--accent); }

section { padding: 6rem 4vw; }

.section-header {
  max-width: 1200px;
  margin: 0 auto 4rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-header h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

/* ===========================
   BUTTONS
=========================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.85rem 1.8rem;
  border-radius: 8px;
  transition: filter 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.85rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border-hi);
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); transform: translateY(-2px); }

/* ===========================
   SKILLS
=========================== */
#skills { background: var(--surface); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.25s, transform 0.25s;
}
.skill-card:hover {
  border-color: var(--accent-mid);
  transform: translateY(-4px);
}
.skill-card.featured {
  grid-column: span 1;
  border-color: var(--accent-mid);
  background: linear-gradient(135deg, var(--accent-dim) 0%, var(--bg) 50%);
}

.skill-icon { margin-bottom: 1.2rem; }

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

.skill-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.4rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
}

/* ===========================
   PROJECTS
=========================== */
#projects { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.project-card:hover {
  border-color: var(--accent-mid);
  transform: translateY(-6px);
}

.project-link { display: block; padding: 0 0 1.8rem; }

.project-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.project-cover-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.project-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a2332 0%, #131a25 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-img-placeholder.alt {
  background: linear-gradient(135deg, #13231f 0%, #0f1a17 100%);
}
.project-img-placeholder.alt2 {
  background: linear-gradient(135deg, #1a1f2e 0%, #131825 100%);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 212, 191, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.project-card:hover .project-overlay { opacity: 1; }

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  margin-bottom: 0.8rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-mid);
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.87rem;
  color: var(--text-muted);
  padding: 0 1.5rem;
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

.project-stack {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.5rem;
  flex-wrap: wrap;
}
.project-stack span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ===========================
   PROJECT DETAIL
=========================== */
.project-detail {
  background: var(--surface);
  padding: 8rem 4vw 6rem;
  border-top: 1px solid var(--border);
  display: none; /* Shown via anchor navigation */
}

/* Show detail section when targeted */
.project-detail:target { display: block; }

.detail-inner {
  max-width: 960px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

.detail-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 1rem 0 2rem;
  line-height: 1.15;
}

.detail-img-placeholder {
  width: 100%;
  aspect-ratio: 16/8;
  background: var(--surface-2);
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 3rem;
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  align-items: start;
}

.detail-overview h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.detail-overview p {
  color: var(--text-muted);
  line-height: 1.8;
}

.detail-sidebar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.detail-meta-item span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.detail-meta-item strong {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

/* ===========================
   FOOTER / CONTACT
=========================== */
#contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6rem 4vw 3rem;
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: '';
  position: absolute;
  bottom: -10%; right: -5%;
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, #2dd4bf10 0%, transparent 70%);
  pointer-events: none;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-top-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 5rem;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 2.5rem;
}

.social-links { display: flex; flex-direction: column; gap: 0.8rem; }
.social-links-row { flex-direction: row; gap: 1rem; }

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  min-width: 200px;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.social-link:hover {
  border-color: var(--accent-mid);
  color: var(--accent);
  transform: translateY(-4px);
}

.social-link span:nth-child(2) { flex: 1; font-weight: 500; }
.link-arrow { font-size: 0.85rem; opacity: 0.5; }
.social-link:hover .link-arrow { opacity: 1; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ===========================
   PROJECT DETAIL PAGE (standalone)
=========================== */
.project-detail-page {
  background: var(--bg);
  padding: 8rem 4vw 6rem;
  min-height: 100vh;
}

.project-detail-page .detail-inner {
  max-width: 960px;
  margin: 0 auto;
}

.detail-hero-img {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
  border: 1px solid var(--border-hi);
}

.detail-hero-img img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-overview h4 {
  margin-top: 2.5rem;
}

.detail-overview h4:first-child {
  margin-top: 0;
}

.detail-breakdown-section {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.detail-breakdown-section h5 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.detail-breakdown-section p {
  color: var(--text-muted);
  line-height: 1.8;
}

.detail-screenshots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface);
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered fade */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-photo-col {
    display: none;
  }
  .hero-bio { margin: 0 auto 2.5rem; }
  .hero-actions, .hero-stats { justify-content: center; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .social-links-row { flex-direction: column; }
}

@media (max-width: 640px) {
  #navbar { padding: 0.9rem 5vw; }
  .nav-links { display: none; }
  section { padding: 4rem 5vw; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .stat-divider { display: none; }
}
