/*--------------------------------------------------------------
Waleed Mahmood — Portfolio
Cinematic dark design system. No framework — hand-rolled.
--------------------------------------------------------------*/

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0b;
  --bg-elevated: #131316;
  --bg-elevated-2: #1a1a1e;
  --fg: #f5f5f2;
  --fg-muted: #8c8c92;
  --fg-faint: #57575d;
  --accent: #d7ff3a;
  --accent-dim: #a8cc2b;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);

  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background: var(--bg);
}

html.lenis {
  height: auto;
}

html.lenis.lenis-smooth {
  scroll-behavior: auto;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
}

body.is-ready {
  opacity: 1;
  transition: opacity 0.6s var(--ease);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  position: relative;
}

::selection {
  background: var(--accent);
  color: #0a0a0b;
}

/* subtle grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

#preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-mark {
  font-family: var(--font-display);
  font-size: clamp(14px, 2vw, 18px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: flex;
  gap: 0.6em;
}

.preloader-mark span {
  color: var(--accent);
}

/* ---------- Custom cursor ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.cursor-ring.is-active {
  width: 60px;
  height: 60px;
  background: rgba(215, 255, 58, 0.08);
  border-color: var(--accent);
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0b;
}

.btn-primary:hover {
  transform: translateY(-3px);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--fg);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.btn i {
  font-size: 16px;
}

/* ---------- Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 22px 0;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  padding: 14px 0;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 14px;
  color: var(--fg-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--fg);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
}

.availability-pill .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #59e07a;
  box-shadow: 0 0 0 0 rgba(89, 224, 122, 0.6);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(89, 224, 122, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(89, 224, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(89, 224, 122, 0); }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  z-index: 600;
  position: relative;
}

.nav-toggle span {
  height: 1.5px;
  width: 100%;
  background: var(--fg);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--bg);
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.nav-drawer.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nav-drawer a {
  font-family: var(--font-display);
  font-size: clamp(32px, 10vw, 52px);
  font-weight: 600;
  color: var(--fg-muted);
}

.nav-drawer a:hover,
.nav-drawer a.is-active {
  color: var(--fg);
}

.nav-drawer .social-row {
  margin-top: 40px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 60px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  max-width: 140vw;
  background: radial-gradient(circle, rgba(215, 255, 58, 0.16) 0%, rgba(215, 255, 58, 0) 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-eyebrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 26px;
}

.hero-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  position: relative;
  z-index: 1;
  font-size: clamp(52px, 10vw, 148px);
  font-weight: 650;
  letter-spacing: -0.03em;
  overflow: hidden;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line span {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}

.hero-title .accent-word {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
}

.hero-role-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 32px);
  color: var(--fg-muted);
  margin-top: 18px;
}

.hero-role-row .typed {
  color: var(--accent);
  font-weight: 600;
}

.hero-lede {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin-top: 26px;
  color: var(--fg-muted);
  font-size: 17px;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.scroll-cue .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--fg-faint), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-cue .line::after {
  content: "";
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--accent);
  animation: scroll-cue-move 1.8s var(--ease) infinite;
}

@keyframes scroll-cue-move {
  to { top: 40px; }
}

/* ---------- Marquee ---------- */
.marquee-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 48px;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-section:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 500;
  color: var(--fg-faint);
  display: flex;
  align-items: center;
  gap: 48px;
  white-space: nowrap;
}

.marquee-track span::after {
  content: "\2726";
  font-size: 14px;
  color: var(--accent);
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Section headers ---------- */
.section-pad {
  padding: 140px 0;
}

.section-head {
  margin-bottom: 64px;
  max-width: 640px;
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section-eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(32px, 5vw, 56px);
}

.section-desc {
  margin-top: 18px;
  color: var(--fg-muted);
  font-size: 16px;
  max-width: 560px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}

.about-photo-wrap {
  position: relative;
}

.about-photo {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4/5;
  object-fit: cover;
  /* filter: grayscale(0.3); */
}

.about-facts {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.about-facts div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.about-facts dt {
  color: var(--fg-faint);
}

.about-facts dd {
  color: var(--fg);
  text-align: right;
}

.about-copy p {
  color: var(--fg-muted);
  font-size: 17px;
  margin-bottom: 22px;
}

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--fg);
  border-left: 2px solid var(--accent);
  padding-left: 26px;
  margin: 36px 0;
  font-weight: 500;
  line-height: 1.35;
}

.callout {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 28px;
  margin-top: 26px;
}

.callout strong {
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.callout p {
  color: var(--fg-muted);
  font-size: 15px;
  margin: 0;
}

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.stat-item {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 44px var(--gutter);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 650;
  color: var(--accent);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-label {
  margin-top: 12px;
  color: var(--fg-muted);
  font-size: 14px;
}

/* ---------- Skills ---------- */
.skills-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 32px;
}

.skill-group h3 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 20px;
}

.tag-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tag-list .tag {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--fg-muted);
  transition: color 0.3s, transform 0.3s var(--ease);
  cursor: default;
  width: fit-content;
}

.tag-list .tag:hover {
  color: var(--accent);
  transform: translateX(6px);
}

/* ---------- Resume / Timeline ---------- */
.resume-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 56px;
}

.resume-tabs button {
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--fg-muted);
  transition: background 0.3s, color 0.3s;
}

.resume-tabs button.is-active {
  background: var(--accent);
  color: #0a0a0b;
}

.resume-panel {
  display: none;
}

.resume-panel.is-active {
  display: block;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.timeline-progress {
  position: absolute;
  left: 5px;
  top: 6px;
  width: 1px;
  height: 0%;
  background: var(--accent);
  transform-origin: top;
}

.timeline-item {
  position: relative;
  padding-bottom: 56px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--fg-faint);
}

.timeline-item.is-visible::before {
  border-color: var(--accent);
  background: var(--accent);
}

.timeline-date {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.timeline-item h4 {
  font-size: clamp(20px, 2.4vw, 26px);
}

.timeline-item h5 {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--fg-muted);
  font-size: 14px;
  margin-top: 4px;
}

.timeline-item ul {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-item li {
  color: var(--fg-muted);
  font-size: 15px;
  padding-left: 18px;
  position: relative;
}

.timeline-item li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 1px;
  background: var(--fg-faint);
}

.timeline-item p em {
  color: var(--fg-muted);
  font-style: normal;
  font-size: 15px;
}

.resume-download {
  margin-top: 56px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 36px;
}

.achievement-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  background: var(--bg-elevated);
  transition: border-color 0.3s;
}

.achievement-card:hover {
  border-color: var(--line-strong);
}

.achievement-card h5 {
  font-size: 15px;
  color: var(--fg);
  margin-bottom: 8px;
}

.achievement-card p {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 0;
}

/* ---------- Portfolio / Work ---------- */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

.filter-pills button {
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-muted);
  transition: all 0.3s var(--ease);
}

.filter-pills button:hover {
  border-color: var(--line-strong);
  color: var(--fg);
}

.filter-pills button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0b;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  aspect-ratio: 4/5;
  transition: transform 0.3s, opacity 0.35s;
}

.work-card.is-hidden {
  display: none;
}

.work-card--wide {
  grid-column: span 2;
  aspect-ratio: 16/10;
}

.work-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
  filter: grayscale(0.5) brightness(0.75);
}

.work-card:hover img {
  transform: scale(1.06);
  filter: grayscale(0) brightness(0.9);
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 11, 0) 40%, rgba(10, 10, 11, 0.92) 100%);
}

.work-card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.work-card-info h4 {
  font-size: 20px;
}

.work-card-info p {
  color: var(--fg-muted);
  font-size: 13px;
  margin-top: 4px;
}

.work-card-cat {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.work-card-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.3s var(--ease), border-color 0.3s;
}

.work-card:hover .work-card-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0b;
  transform: rotate(45deg);
}

/* ---------- Contact ---------- */
.contact-section {
  text-align: center;
}

.contact-title {
  font-size: clamp(36px, 7vw, 88px);
  max-width: 900px;
  margin: 0 auto;
}

.contact-title .accent-word {
  color: var(--accent);
}

.email-link {
  display: inline-block;
  margin-top: 40px;
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 34px);
  color: var(--fg-muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 6px;
  transition: color 0.3s, border-color 0.3s;
  position: relative;
}

.email-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.copy-hint {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-top: 10px;
  font-family: var(--font-body);
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 50px;
}

.social-row a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--fg-muted);
  transition: all 0.3s var(--ease);
}

.social-row a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-4px);
}

.contact-cta-btn {
  margin-top: 56px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(6, 6, 7, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 560px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.35s var(--ease);
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.modal-head h3 {
  font-size: 22px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, color 0.3s;
}

.modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  margin-bottom: 14px;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.3s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.form-status {
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 18px;
}

.form-status.is-error {
  color: #ff6767;
}

.form-status.is-success {
  color: var(--accent);
}

.modal .btn-primary {
  width: 100%;
  justify-content: center;
}

.modal .btn-primary:disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-inner p {
  color: var(--fg-faint);
  font-size: 13px;
}

.footer-social {
  display: flex;
  gap: 18px;
}

.footer-social a {
  color: var(--fg-muted);
  font-size: 16px;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: var(--accent);
}

/* ---------- Scroll top ---------- */
.scroll-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0a0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Reveal utility (GSAP toggles these via inline styles; base state) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

/* ---------- Page title (detail pages) ---------- */
.page-hero {
  padding: 170px 0 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-muted);
  font-size: 14px;
  margin-bottom: 30px;
  transition: color 0.3s, gap 0.3s;
}

.back-link:hover {
  color: var(--accent);
  gap: 12px;
}

.detail-category {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 20px;
}

.detail-title {
  font-size: clamp(36px, 6vw, 68px);
  max-width: 900px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 70px;
  padding: 0 0 140px;
  align-items: start;
}

.detail-image {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.detail-image img {
  width: 100%;
  display: block;
}

.detail-image-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-meta {
  border-top: 1px solid var(--line);
  margin-top: 30px;
}

.detail-meta div {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.detail-meta dt {
  color: var(--fg-faint);
}

.detail-meta dd a {
  color: var(--accent);
}

.detail-desc {
  color: var(--fg-muted);
  font-size: 16px;
  margin-top: 26px;
}

.detail-visit {
  margin-top: 34px;
}

/* ---------- Service placeholder page ---------- */
.service-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  padding-bottom: 140px;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
}

.service-list a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg-muted);
  font-size: 15px;
}

.service-list a.active,
.service-list a:hover {
  color: var(--accent);
}

.service-body h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.service-body h4 {
  font-size: 18px;
  margin-bottom: 14px;
}

.service-body p {
  color: var(--fg-muted);
  margin-bottom: 18px;
  font-size: 15px;
}

.service-body ul {
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-body li {
  color: var(--fg-muted);
  font-size: 15px;
  display: flex;
  gap: 10px;
}

.service-body li i {
  color: var(--accent);
  margin-top: 3px;
}

.service-img {
  border-radius: 16px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo-wrap {
    max-width: 320px;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .skills-groups {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-card--wide {
    grid-column: span 2;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .service-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-drawer {
    display: flex;
  }

  .availability-pill span:not(.pulse) {
    display: none;
  }

  .section-pad {
    padding: 96px 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .skills-groups {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-card--wide {
    grid-column: span 1;
    aspect-ratio: 4/5;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .resume-tabs {
    width: 100%;
    justify-content: center;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .skills-groups {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }

  .modal {
    padding: 28px 22px;
  }
}
