/* ================================================
   Portfolio — style.css
   Game Developer Portfolio · Ayberk Türksoy
   ================================================ */

/* ---- 1. VARIABLES ---- */
:root {
  --bg:          #0D1117;
  --bg-surface:  #161B22;
  --bg-elevated: #1C2128;
  --border:      #21262D;
  --accent:      #00D4FF;
  --accent-glow: rgba(0, 212, 255, 0.22);
  --accent-dim:  rgba(0, 212, 255, 0.08);
  --text:        #E6EDF3;
  --text-2:      #7D8B96;
  --text-muted:  #3D444D;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --nav-h:    64px;
  --radius:   6px;
  --radius-lg: 12px;
  --ease:     0.22s ease;
  --shadow:   0 4px 24px rgba(0, 0, 0, 0.45);
}

/* ---- 2. RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---- 3. TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
}

/* ---- 4. LAYOUT UTILITIES ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding: 5rem 0; }

.section-label {
  font-family: var(--font-display);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}
.section-subtitle {
  color: var(--text-2);
  font-size: 1.025rem;
  max-width: 520px;
  line-height: 1.7;
}

.section-header { margin-bottom: 3rem; }
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

/* ---- 5. BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
  border: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-primary {
  background: var(--accent);
  color: #0a0d11;
}
.btn-primary:hover {
  background: #fff;
  box-shadow: 0 0 22px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.view-all-link {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--ease);
  white-space: nowrap;
}
.view-all-link:hover { gap: 0.8rem; }
.view-all-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }

/* ---- 6. TAGS ---- */
.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 255, 0.2);
}
.tag-client {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ---- 7. NAVIGATION ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: rgba(22, 27, 34, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  position: relative;
  transition: color var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.nav-cta {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: var(--accent) !important;
  border: 1px solid rgba(0, 212, 255, 0.5);
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  transition: background var(--ease), color var(--ease) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--bg) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 0.2rem;
  line-height: 0;
}
.nav-toggle:focus-visible { outline: 2px solid var(--accent); border-radius: 2px; }

/* ---- 8. HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

#hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

body > main,
body > footer {
  position: relative;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 7rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.35rem 0.9rem 0.35rem 0.55rem;
  border: 1px solid rgba(0, 212, 255, 0.28);
  border-radius: 100px;
  background: var(--accent-dim);
  margin-bottom: 2rem;
}
.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.65); }
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1.0;
  margin-bottom: 0.2rem;
}
.hero-title-name { display: block; }
.hero-title-accent { color: var(--accent); }

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-2);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 1rem 0 1.5rem;
}

.hero-desc {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 460px;
  line-height: 1.75;
  margin-bottom: 2.75rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 1;
  animation: scroll-bounce 2.8s ease-in-out infinite;
}
.hero-scroll-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(7px); }
}

/* ---- 9. FLIP CARDS (signature element) ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.flip-card {
  height: 370px;
  perspective: 1100px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.58s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner,
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.card-front {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: border-color var(--ease);
}
.flip-card:hover .card-front { border-color: rgba(0, 212, 255, 0.3); }

.card-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  user-select: none;
}

/* Unique card gradients */
.cg-1 { background: linear-gradient(135deg, #1a1035 0%, #3b1f78 60%, #7c3aed 100%); }
.cg-2 { background: linear-gradient(135deg, #001018 0%, #003a52 55%, #00d4ff 100%); }
.cg-3 { background: linear-gradient(135deg, #1a0800 0%, #7c2d12 55%, #f97316 100%); }
.cg-4 { background: linear-gradient(135deg, #0f0720 0%, #581c87 55%, #ec4899 100%); }
.cg-5 { background: linear-gradient(135deg, #0a1a0a 0%, #14532d 55%, #4ade80 100%); }
.cg-6 { background: linear-gradient(135deg, #0a0014 0%, #3b0764 55%, #a855f7 100%); }

.card-front-info {
  padding: 1.2rem 1.4rem;
  border-top: 1px solid var(--border);
}
.card-front-title {
  font-size: 1.0rem;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.card-front-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Card corner badge (Personal / Client Work) */
.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 100px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card-badge-client {
  background: rgba(0, 212, 255, 0.16);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 255, 0.45);
}
.card-badge-personal {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.card-back {
  background: var(--bg-elevated);
  border: 1px solid rgba(0, 212, 255, 0.45);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  gap: 0.9rem;
}
.card-back-label {
  font-size: 0.63rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.card-back-title {
  font-size: 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.card-back-desc {
  font-size: 0.855rem;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
}
.card-back .btn {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.8rem;
  padding: 0.55rem 1.1rem;
}

/* ---- 10. ABOUT TEASER ---- */
.about-teaser {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}
.about-teaser-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-teaser-text .section-title { margin-bottom: 1rem; }
.about-teaser-text p {
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--ease);
}
.stat-card:hover { border-color: rgba(0, 212, 255, 0.35); }
.stat-number {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.2rem;
}
.stat-label {
  font-size: 0.79rem;
  color: var(--text-2);
  font-weight: 500;
}

/* ---- 11. FOOTER ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-2);
}
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 0.76rem; color: var(--text-muted); }
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.8rem;
  color: var(--text-2);
  transition: color var(--ease);
}
.footer-links a:hover { color: var(--accent); }
.footer-links a:focus-visible { outline: 2px solid var(--accent); border-radius: 2px; }

/* ---- 12. PAGE HEADER (inner pages) ---- */
.page-hero {
  padding: 8rem 0 4rem;
  border-bottom: 1px solid var(--border);
}
.page-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.75rem;
}
.page-hero-desc {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 520px;
  line-height: 1.75;
}

/* ---- 13. ABOUT PAGE ---- */
.about-section { padding: 4rem 0; }

.about-grid {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 4rem;
  align-items: start;
}

.about-body { color: var(--text-2); font-size: 1rem; line-height: 1.85; }
.about-body p + p { margin-top: 1.25rem; }
.about-body strong { color: var(--text); font-weight: 600; }

.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.sidebar-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}
.sidebar-block-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.exp-item {
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  transition: border-color var(--ease);
}
.exp-item:hover { border-color: var(--accent); }
.exp-role {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.exp-company { font-size: 0.8rem; color: var(--accent); }
.exp-period { font-size: 0.73rem; color: var(--text-muted); margin-top: 0.1rem; }

/* ---- 14. PROJECTS PAGE ---- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.filter-btn {
  font-family: var(--font-display);
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--ease);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-dim);
  border-color: rgba(0, 212, 255, 0.5);
  color: var(--accent);
}
.filter-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-bottom: 5rem;
}
.project-card-item.hidden { display: none; }

/* ---- 15. CONTACT PAGE ---- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  padding: 4rem 0;
}
.contact-intro {
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}
.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--ease);
}
.contact-email-link:hover { gap: 0.85rem; }
.contact-email-link:focus-visible { outline: 2px solid var(--accent); border-radius: 2px; }

.social-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.social-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: border-color var(--ease), transform var(--ease);
}
.social-card:hover {
  border-color: rgba(0, 212, 255, 0.5);
  transform: translateX(5px);
}
.social-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius); }

.social-icon {
  width: 42px; height: 42px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.15rem;
}
.social-card-text { flex: 1; }
.social-card-name {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
}
.social-card-handle { font-size: 0.78rem; color: var(--text-2); margin-top: 0.1rem; }
.social-card-arrow {
  color: var(--text-muted);
  transition: color var(--ease), transform var(--ease);
}
.social-card:hover .social-card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ---- 16. PROJECT DETAIL ---- */
.project-detail-header {
  padding: 8rem 0 3rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-family: var(--font-display);
  color: var(--text-2);
  margin-bottom: 2rem;
  transition: color var(--ease), gap var(--ease);
}
.back-link:hover { color: var(--accent); gap: 0.7rem; }
.back-link:focus-visible { outline: 2px solid var(--accent); border-radius: 2px; }

.project-detail-title { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.project-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.project-detail-desc {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 640px;
  line-height: 1.8;
  margin-bottom: 2rem;
}
.project-detail-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.game-embed-section {
  padding: 0 0 3rem;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}
.game-embed-label {
  font-size: 0.73rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.game-embed-wrapper {
  position: relative;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}
.game-embed-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.game-embed-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-2);
}
.game-embed-placeholder-icon { font-size: 2.75rem; opacity: 0.25; }
.game-embed-placeholder-text { font-size: 0.85rem; }

.project-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}
.project-info-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.project-info-label {
  font-size: 0.66rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.project-info-value {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* ---- 17. CARD STORE LINKS ---- */
.card-store-links {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  flex-wrap: wrap;
}
.card-store-links .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.75rem;
  padding: 0.5rem 0.6rem;
  min-width: 0;
}

/* ---- 17b. FADE-IN ANIMATIONS ---- */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible { opacity: 1; transform: none; }
.fade-in:nth-child(2) { transition-delay: 0.08s; }
.fade-in:nth-child(3) { transition-delay: 0.16s; }
.fade-in:nth-child(4) { transition-delay: 0.24s; }
.fade-in:nth-child(5) { transition-delay: 0.32s; }
.fade-in:nth-child(6) { transition-delay: 0.4s; }

/* ---- 18. RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: #0D1117;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.5rem;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-top: 1px solid var(--border);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
    z-index: 200;
  }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a { display: block; padding: 1.1rem 0; font-size: 1rem; }
  .nav-links a::after { display: none; }
  .nav-toggle { display: block; }
  .nav-cta { margin-top: 0.5rem; text-align: center; }
}

@media (max-width: 1024px) {
  .cards-grid,
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-teaser-inner { grid-template-columns: 1fr; gap: 3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-sidebar { position: static; }
  .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
  .project-info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
  .section { padding: 3.5rem 0; }
  .cards-grid,
  .projects-grid { grid-template-columns: 1fr; }
  .flip-card { height: 350px; }
  .section-header-row { flex-direction: column; align-items: flex-start; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .page-hero { padding: 6rem 0 2.5rem; }
  .project-info-grid { grid-template-columns: 1fr 1fr; }
  .project-detail-links { flex-direction: column; }
  .hero-desc { font-size: 0.95rem; }
}
