@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300;1,9..40,400&family=Syne:wght@400;500;600;700;800&display=swap');

/*  CSS Variables  */
:root {
  /* Light mode */
  --bg:           #f5f5f7;
  --bg-alt:       #ffffff;
  --bg-card:      #ffffff;
  --bg-nav:       rgba(245, 245, 247, 0.72);
  --border:       rgba(0, 0, 0, 0.08);
  --text:         #1d1d1f;
  --text-muted:   #6e6e73;
  --text-xmuted:  #aeaeb2;
  --accent:       #0071e3;
  --accent-hover: #0077ed;
  --accent-soft:  rgba(0, 113, 227, 0.10);
  --pill-bg:      rgba(0,0,0,0.055);
  --pill-text:    #1d1d1f;
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:    0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg:    0 24px 56px rgba(0,0,0,0.13);
  --radius:       18px;
  --radius-sm:    10px;
  --radius-pill:  999px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --nav-height:   64px;
  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg:           #000000;
  --bg-alt:       #0a0a0a;
  --bg-card:      #161617;
  --bg-nav:       rgba(0, 0, 0, 0.72);
  --border:       rgba(255, 255, 255, 0.08);
  --text:         #f5f5f7;
  --text-muted:   #98989d;
  --text-xmuted:  #636366;
  --accent:       #2997ff;
  --accent-hover: #409cff;
  --accent-soft:  rgba(41, 151, 255, 0.12);
  --pill-bg:      rgba(255,255,255,0.08);
  --pill-text:    #f5f5f7;
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.3);
  --shadow-md:    0 8px 32px rgba(0,0,0,0.45);
  --shadow-lg:    0 24px 56px rgba(0,0,0,0.6);
}

/*  Reset & Base ─ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }

/*  Typography ─ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

/*  Layout Helpers ─ */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

/*  NAV  */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.nav__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--transition);
}
.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover { color: var(--text); background: var(--pill-bg); }
.nav__link.active {
  color: var(--text);
  background: var(--pill-bg);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav__icon-btn:hover { color: var(--text); background: var(--pill-bg); }
.nav__icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn-contact {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  transition: background var(--transition), transform 0.15s;
}
.btn-contact:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-contact:active { transform: translateY(0); }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.nav__hamburger:hover { background: var(--pill-bg); }
.nav__hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s, width 0.3s;
}
.nav__hamburger span:nth-child(2) { width: 70%; }
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; width: 100%; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height); left: 0; right: 0;
  z-index: 999;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
}
.nav__mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.nav__mobile-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav__mobile-link:hover, .nav__mobile-link.active {
  color: var(--text);
  background: var(--pill-bg);
}
.nav__mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.nav__mobile-contact {
  margin-top: 8px;
  display: block;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
}

/*  BUTTONS  */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  transition: transform 0.18s, box-shadow 0.18s, background var(--transition), color var(--transition);
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,113,227,0.25);
}
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost {
  background: var(--pill-bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: var(--border); }

.btn svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/*  HERO ─ */
.hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.hero__orb--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -150px; right: -100px;
  animation: orbFloat1 8s ease-in-out infinite;
}
.hero__orb--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #bf5af2 0%, transparent 70%);
  bottom: -100px; left: 30%;
  animation: orbFloat2 10s ease-in-out infinite;
  opacity: 0.2;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 40px) scale(1.05); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.08); }
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 80px 48px 80px 0;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--pill-bg);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 28px;
}
.hero__tag-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,113,227,0.4); }
  50% { box-shadow: 0 0 0 5px rgba(0,113,227,0); }
}
[data-theme="dark"] .hero__tag-dot {
  animation: pulseDark 2s ease-in-out infinite;
}
@keyframes pulseDark {
  0%, 100% { box-shadow: 0 0 0 0 rgba(41,151,255,0.4); }
  50% { box-shadow: 0 0 0 5px rgba(41,151,255,0); }
}

.hero__title {
  font-size: clamp(46px, 6vw, 80px);
  font-weight: 710;
  margin-bottom: 20px;
  color: var(--text);
}
.hero__title-accent { color: var(--accent); }

.hero__sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 440px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__image-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 0 80px 48px;
}

.hero__image-frame {
  position: relative;
  width: 420px;
  max-width: 100%;
}

.hero__image-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(135deg, var(--accent), #bf5af2, var(--accent));
  opacity: 0.4;
  z-index: -1;
  animation: borderRotate 6s linear infinite;
  background-size: 200% 200%;
}

@keyframes borderRotate {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 200%; }
}

.hero__image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.hero__image-wrap:hover .hero__image { transform: scale(1.02) rotate(-0.5deg); }

/* Floating stats chips */
.hero__chip {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  animation: chipFloat 4s ease-in-out infinite;
}
.hero__chip--1 { bottom: 120px; left: -40px; animation-delay: 0s; }
.hero__chip--2 { top: 100px; right: -30px; animation-delay: 1.5s; }

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

.hero__chip-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
}
.hero__chip-icon svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hero__chip-label { color: var(--text-xmuted); font-size: 11px; }
.hero__chip-value { font-size: 14px; font-weight: 700; font-family: var(--font-display); }

/*  HOME SECTIONS  */
.skills-section { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #bf5af2);
  opacity: 0;
  transition: opacity var(--transition);
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.skill-card:hover::before { opacity: 1; }

.skill-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.skill-card__icon svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skill-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  font-family: var(--font-display);
}
.skill-card__text { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* Tech Stack Bar */
.stack-section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stack-scroll {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.stack-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.stack-pill:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.stack-pill span { font-size: 16px; }

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 100px 0;
  position: relative;
}

.cta-section h2 {
  font-size: clamp(32px, 4vw, 52px);
  margin-bottom: 16px;
}
.cta-section p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.cta-section .btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/*  PORTFOLIO PAGE ─ */
.page-hero {
  padding: calc(var(--nav-height) + 80px) 0 60px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(38px, 5vw, 64px); margin-bottom: 16px; }
.page-hero p { font-size: 17px; color: var(--text-muted); max-width: 520px; margin: 0 auto; }

/*  CONTACT PAGE ─ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  padding: 48px 0 100px;
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info h1 { font-size: clamp(32px, 4vw, 46px); margin-bottom: 16px; }
.contact-info > p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 420px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.contact-detail:last-of-type { border-bottom: 1px solid var(--border); }
.contact-detail__icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
}
.contact-detail__icon svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-detail__label { font-size: 12px; color: var(--text-xmuted); text-transform: uppercase; letter-spacing: 0.06em; }
.contact-detail__value { font-size: 15px; color: var(--text); font-weight: 500; }
.contact-detail__value a:hover { color: var(--accent); }

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 600px) {
  .contact-form-card { padding: 28px 22px; }
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.form-input, .form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-xmuted); }
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-textarea { resize: vertical; min-height: 140px; line-height: 1.6; }

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  cursor: pointer;
  font-family: var(--font-body);
}
.form-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none !important; }

.form-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: form-spin 0.7s linear infinite;
  display: none;
}
.form-submit.is-loading .form-spinner { display: inline-block; }
.form-submit.is-loading .form-submit__label { opacity: 0.85; }
@keyframes form-spin { to { transform: rotate(360deg); } }

.form-status {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
}
.form-status.is-visible { display: flex; }
.form-status--success { background: rgba(48, 209, 88, 0.12); color: #2fa64c; }
[data-theme="dark"] .form-status--success { color: #30d158; }
.form-status--error { background: rgba(255, 69, 58, 0.12); color: #d92c25; }
[data-theme="dark"] .form-status--error { color: #ff453a; }
.form-status svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; fill: none; stroke: currentColor; }

/* Filter tabs */
.filter-bar {
  display: flex;
  gap: 8px;
  margin: 48px 0 40px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
}
.filter-btn:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0,113,227,0.3);
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  padding-bottom: 100px;
}

/* Project Card */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.project-card:hover { transform: translateY(-6px) scale(1.01); box-shadow: var(--shadow-lg); }

.project-card__img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-alt);
}
.project-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.project-card:hover .project-card__img img { transform: scale(1.06); }

/* Placeholder image for cards without real image */
.project-card__img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
}
.project-card__img-placeholder svg {
  width: 48px; height: 48px;
  stroke: var(--text-xmuted);
  fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.project-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.category-badge--frontend  { background: rgba(0,113,227,0.12); color: var(--accent); }
.category-badge--discord   { background: rgba(88,101,242,0.12); color: #5865f2; }
.category-badge--tool      { background: rgba(52,199,89,0.12);  color: #34c759; }

.project-card__arrow {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition), transform 0.2s;
}
.project-card__arrow svg { width: 14px; height: 14px; stroke: var(--text-muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.project-card:hover .project-card__arrow { background: var(--accent); border-color: var(--accent); transform: rotate(-45deg); }
.project-card:hover .project-card__arrow svg { stroke: #fff; }

.project-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  font-family: var(--font-display);
  color: var(--text);
}
.project-card__sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
  flex: 1;
}
.project-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--text-muted);
}

/* GitHub Section */
.github-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 100px;
  box-shadow: var(--shadow-sm);
}
.github-section h2 { font-size: 28px; margin-bottom: 8px; }
.github-section p { color: var(--text-muted); }
.github-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.2s;
  white-space: nowrap;
}
.github-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); opacity: 0.9; }
.github-link svg { width: 18px; height: 18px; fill: currentColor; }

/*  ABOUT PAGE ─ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
  padding-bottom: 100px;
}

.about-photo-wrap { position: sticky; top: calc(var(--nav-height) + 32px); }

.about-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-lg);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.about-photo-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(145deg, var(--bg-alt), var(--bg));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  color: var(--text-xmuted);
  font-size: 14px;
}
.about-photo-placeholder svg { width: 56px; height: 56px; stroke: var(--text-xmuted); fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

.about-photo__badge {
  position: absolute;
  bottom: 20px; left: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
}
.about-photo__badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #34c759; animation: pulse 2s infinite; }
.about-photo__badge-text { font-size: 13px; font-weight: 500; }

.about-content { padding-top: 20px; }
.about-content h1 { font-size: clamp(34px, 4vw, 52px); margin-bottom: 8px; }
.about-content .sub { font-size: 17px; color: var(--text-muted); margin-bottom: 40px; }

.about-content h2 {
  font-size: 24px;
  margin: 40px 0 16px;
  font-family: var(--font-display);
}
.about-content p { font-size: 16px; color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }

/* Skills bars */
.skills-list { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }

.skill-item { display: flex; flex-direction: column; gap: 8px; }
.skill-item__header { display: flex; justify-content: space-between; align-items: center; }
.skill-item__name { font-size: 14px; font-weight: 500; }
.skill-item__pct { font-size: 13px; color: var(--text-muted); }

.skill-bar {
  height: 6px;
  background: var(--pill-bg);
  border-radius: 3px;
  overflow: hidden;
}
.skill-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #bf5af2);
  width: 0%;
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
}

/* Timeline */
.timeline { margin-top: 24px; position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 8px; bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding: 0 0 32px 36px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 2px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-item__year {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.timeline-item__title { font-size: 16px; font-weight: 600; margin-bottom: 6px; font-family: var(--font-display); }
.timeline-item__text { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/*  LEGAL PAGES  */
.legal-page {
  padding: calc(var(--nav-height) + 80px) 0 100px;
}
.legal-page h1 { font-size: 40px; margin-bottom: 8px; }
.legal-page .subtitle { color: var(--text-muted); margin-bottom: 64px; font-size: 16px; }

.legal-content h2 {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-display);
  margin: 40px 0 12px;
  color: var(--text);
}
.legal-content h3 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; font-family: var(--font-body); }
.legal-content p, .legal-content li { font-size: 15px; color: var(--text-muted); line-height: 1.8; margin-bottom: 12px; }
.legal-content ul { padding-left: 20px; list-style: disc; }
.legal-content a { color: var(--accent); }
.legal-content a:hover { text-decoration: underline; }

.legal-content .placeholder {
  background: var(--pill-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-style: italic;
  color: var(--text-muted);
  display: inline-block;
}

/*  FOOTER ─ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.03em;
}
.footer__logo span { color: var(--accent); }

.footer__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__link {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer__link:hover { color: var(--text); }

.footer__copy {
  font-size: 13px;
  color: var(--text-xmuted);
}

/*  SCROLL ANIMATIONS  */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.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; }

/*  CARD HIDDEN STATE (for filter) ─ */
.project-card.hidden {
  display: none;
}

/*  RESPONSIVE ─ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero__content { padding: 80px 0 0; }
  .hero__sub { margin: 0 auto 40px; }
  .hero__ctas { justify-content: center; }
  .hero__image-wrap { justify-content: center; padding: 40px 0 80px; }
  .hero__image-frame { width: 320px; }
  .hero__chip--1 { display: none; }
  .hero__chip--2 { display: none; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { position: static; }
  .about-photo { max-width: 320px; }
  .github-section { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
  :root { --nav-height: 56px; }
  .nav__links, .nav__right .btn-contact, .nav__right .nav__icon-btn:not(.theme-toggle) { display: none; }
  .nav__hamburger { display: flex; }
  .nav__mobile { display: flex; }
  .skills-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .hero__image-frame { width: 260px; }
  .github-section { padding: 32px; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero__title { font-size: 38px; }
  .filter-bar { gap: 6px; }
  .filter-btn { font-size: 13px; padding: 7px 16px; }
}
