/* ═══════════════════════════════════════════════════════════════
   IBRAHIM REDA WASFY — PORTFOLIO STYLESHEET
   Aesthetic: Precision Motorsport / Dark Engineering Premium
   ═══════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ───────────────────────────────────────────── */
:root {
  --bg:          #0a0a0b;
  --bg-2:        #0f0f11;
  --bg-3:        #141417;
  --bg-4:        #1a1a1e;
  --surface:     #1e1e23;
  --surface-2:   #252529;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.12);

  --accent:      #c8a84b;       /* Motorsport gold */
  --accent-dim:  rgba(200,168,75,0.15);
  --accent-glow: rgba(200,168,75,0.35);
  --red:         #d44d3e;
  --red-dim:     rgba(212,77,62,0.15);

  --text:        #e8e8ea;
  --text-2:      #9a9aa8;
  --text-3:      #5c5c6b;

  --ff-display:  'Bebas Neue', sans-serif;
  --ff-body:     'Barlow', sans-serif;
  --ff-cond:     'Barlow Condensed', sans-serif;
  --ff-mono:     'JetBrains Mono', monospace;

  --max-w:       1280px;
  --section-py:  120px;

  --radius:      4px;
  --radius-lg:   8px;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── RESET ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }
::selection { background: var(--accent); color: #000; }

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

/* ── LOADER ────────────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-logo {
  font-family: var(--ff-display);
  font-size: clamp(48px, 8vw, 80px);
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 32px;
}
.loader-bar {
  width: 200px;
  height: 2px;
  background: var(--surface);
  margin: 0 auto 16px;
  overflow: hidden;
  border-radius: 2px;
}
.loader-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  animation: loaderFill 1.8s var(--ease-out) forwards;
}
@keyframes loaderFill { to { width: 100%; } }
.loader-text {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.2em;
  animation: blink 1s ease infinite alternate;
}
@keyframes blink { to { opacity: 0.4; } }

/* ── NAV ────────────────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex; align-items: center; gap: 32px;
  padding: 0 clamp(20px, 4vw, 60px);
  height: 72px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
#navbar.scrolled {
  background: rgba(10,10,11,0.92);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav-logo a {
  font-family: var(--ff-display);
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.15em;
}
.nav-links {
  display: flex; gap: 28px;
  margin-left: auto;
}
.nav-links a {
  font-family: var(--ff-cond);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  font-family: var(--ff-cond);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 20px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent); color: #000; }
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; padding: 4px;
}
.nav-hamburger span { width: 24px; height: 2px; background: var(--text); display: block; transition: transform 0.3s, opacity 0.3s; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-cond);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--radius);
  transition: all 0.25s var(--ease-out);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #000; border-color: var(--accent);
}
.btn-primary:hover { background: transparent; color: var(--accent); }
.btn-secondary {
  background: transparent; color: var(--text); border-color: var(--border-2);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent; color: var(--text-2); border-color: transparent;
  padding-left: 0; padding-right: 0;
}
.btn-ghost:hover { color: var(--accent); }
.btn-large { padding: 18px 40px; font-size: 15px; }

/* ── CONTAINER ───────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}

/* ── SECTION COMMON ──────────────────────────────────────────── */
section {
  padding: var(--section-py) 0;
  position: relative;
}
section:nth-child(even) { background: var(--bg-2); }
.section-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--ff-display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  color: var(--text);
  margin-bottom: 64px;
  letter-spacing: 0.02em;
}
.section-title em {
  font-style: normal;
  color: var(--accent);
}

/* ── HERO ────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px clamp(20px, 4vw, 60px) 80px;
  position: relative;
  overflow: hidden;
  gap: 60px;
  max-width: var(--max-w);
  margin: 0 auto;
}
#heroCanvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}
.hero-content {
  position: relative; z-index: 1;
  flex: 1; min-width: 0;
  max-width: 680px;
}
.hero-tag {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0; transform: translateY(16px);
  animation: revealUp 0.8s var(--ease-out) 0.2s forwards;
}
.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(56px, 7vw, 110px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 24px;
  opacity: 0; transform: translateY(20px);
  animation: revealUp 0.8s var(--ease-out) 0.35s forwards;
}
.hero-first { display: block; color: var(--text); }
.hero-last { display: block; color: var(--accent); }
.hero-title {
  font-family: var(--ff-cond);
  font-size: clamp(18px, 2.5vw, 26px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 28px;
  opacity: 0; transform: translateY(16px);
  animation: revealUp 0.8s var(--ease-out) 0.5s forwards;
}
.hero-summary {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 560px;
  margin-bottom: 48px;
  opacity: 0; transform: translateY(16px);
  animation: revealUp 0.8s var(--ease-out) 0.65s forwards;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 16px;
  opacity: 0; transform: translateY(16px);
  animation: revealUp 0.8s var(--ease-out) 0.8s forwards;
}
.hero-profile {
  position: relative; z-index: 1;
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
  opacity: 0; transform: translateX(30px);
  animation: revealRight 1s var(--ease-out) 0.6s forwards;
}
.profile-frame {
  width: clamp(200px, 25vw, 320px);
  aspect-ratio: 3/4;
  border: 1px solid var(--border-2);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.profile-frame::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent 60%);
  z-index: 2; pointer-events: none;
}
.profile-frame img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: top center;
}
.profile-frame.no-image img { display: none; }
.profile-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%;
  background: var(--surface);
  color: var(--text-3);
  text-align: center;
  padding: 20px;
}
.profile-placeholder span {
  font-family: var(--ff-display);
  font-size: 64px;
  color: var(--border-2);
  display: block;
  margin-bottom: 12px;
}
.profile-placeholder small { font-size: 11px; font-family: var(--ff-mono); }
.profile-frame:not(.no-image) .profile-placeholder { display: none; }
.hero-stats {
  display: flex; gap: 32px;
}
.hero-stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--ff-display);
  font-size: 42px;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-scroll {
  position: absolute;
  bottom: 40px; left: clamp(20px, 4vw, 60px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 1;
}
.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: scrollPulse 2s ease infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}
.scroll-label {
  font-family: var(--ff-mono);
  font-size: 9px;
  color: var(--text-3);
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
  text-transform: uppercase;
}

/* ── REVEAL ANIMATIONS ───────────────────────────────────────── */
@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes revealRight {
  to { opacity: 1; transform: translateX(0); }
}
[data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-reveal].visible { opacity: 1; transform: translateY(0); }

/* ── ABOUT ──────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 80px;
  align-items: start;
}
.about-lead {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 24px;
}
.about-text p:not(.about-lead) {
  color: var(--text-2);
  margin-bottom: 20px;
}
.about-pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 48px;
}
.pillar {
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  padding: 24px 20px;
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.pillar:hover { border-color: var(--accent); }
.pillar-icon { color: var(--accent); font-size: 20px; margin-bottom: 12px; }
.pillar strong { display: block; font-size: 14px; margin-bottom: 8px; font-family: var(--ff-cond); letter-spacing: 0.05em; text-transform: uppercase; }
.pillar span { font-size: 13px; color: var(--text-3); }
.about-sidebar { display: flex; flex-direction: column; gap: 16px; }
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.about-card-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.about-card p { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.about-card strong { color: var(--text); }
.dim { color: var(--text-3); }

/* ── HIGHLIGHTS ─────────────────────────────────────────────── */
#highlights { background: var(--bg); }
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 64px;
}
.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; gap: 20px;
  transition: border-left-color 0.3s, transform 0.3s var(--ease-out), background 0.3s;
}
.highlight-card:hover {
  border-left-color: var(--accent);
  transform: translateY(-4px);
  background: var(--surface-2);
}
.highlight-card--gold { border-left-color: var(--accent); }
.hc-medal { font-size: 32px; flex-shrink: 0; }
.hc-tag {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hc-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  font-family: var(--ff-cond);
  letter-spacing: 0.03em;
}
.hc-content p { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.stats-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 36px 20px;
  text-align: center;
  gap: 8px;
}
.stat-big {
  font-family: var(--ff-display);
  font-size: clamp(42px, 5vw, 72px);
  color: var(--accent);
  line-height: 1;
  display: block;
}
.stat-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}
.stat-desc small { font-size: 11px; color: var(--text-3); }
.stat-divider { width: 1px; height: 80px; background: var(--border); flex-shrink: 0; }

/* ── SKILLS ─────────────────────────────────────────────────── */
#skills { background: var(--bg-2); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.skill-cat-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.skill-cat-icon { color: var(--accent); font-size: 18px; }
.skill-cat-header h3 {
  font-family: var(--ff-cond);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}
.skill-list { display: flex; flex-direction: column; gap: 16px; }
.skill-item {}
.skill-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-2);
  margin-bottom: 6px;
}
.skill-badge {
  font-family: var(--ff-mono);
  font-size: 9px;
  color: #000;
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.1em;
}
.skill-bar {
  height: 3px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #e8c06a);
  border-radius: 3px;
  width: 0%;
  transition: width 1.2s var(--ease-out);
}
.cert-list { display: flex; flex-direction: column; gap: 16px; }
.cert-item { display: flex; align-items: center; gap: 16px; }
.cert-logo {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}
.cert-item strong { display: block; font-size: 14px; }
.cert-item span { font-size: 12px; color: var(--text-3); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  font-family: var(--ff-cond);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-2);
  border: 1px solid var(--border-2);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s;
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── EXPERIENCE TIMELINE ─────────────────────────────────────── */
#experience { background: var(--bg); }
.timeline {
  position: relative;
  padding-left: 48px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 14px; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: start;
}
.timeline-dot {
  position: absolute;
  left: -40px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--border-2);
  transition: border-color 0.2s, background 0.2s;
}
.timeline-item--current .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.timeline-item:hover .timeline-dot { border-color: var(--accent); }
.timeline-date {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text-3);
  padding-top: 6px;
  line-height: 1.4;
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s;
}
.timeline-item:hover .timeline-card { border-color: var(--border-2); }
.tc-tag {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.timeline-card h3 {
  font-size: 17px;
  font-weight: 600;
  font-family: var(--ff-cond);
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}
.timeline-card p { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.tc-skills {
  margin-top: 14px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}

/* ── FORMULA STUDENT ─────────────────────────────────────────── */
#formula-student { background: var(--bg-2); }
.fs-layout {}
.fs-intro { margin-bottom: 48px; }
.fs-lead {
  font-size: 20px;
  line-height: 1.7;
  color: var(--text);
  max-width: 700px;
  margin-bottom: 28px;
}
.fs-role-badge {
  display: inline-flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  background: var(--accent-dim);
  padding: 16px 24px;
  border-radius: var(--radius);
}
.role-title {
  font-family: var(--ff-display);
  font-size: 24px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.role-sub {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text-2);
}
.fs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.fs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s;
}
.fs-card:hover { border-color: var(--border-2); }
.fs-card--highlight {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-dim), var(--surface));
}
.fs-card-icon { font-size: 28px; margin-bottom: 16px; }
.fs-card h4 {
  font-family: var(--ff-cond);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--text);
}
.fs-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.fs-card ul li {
  font-size: 14px;
  color: var(--text-2);
  padding-left: 16px;
  position: relative;
}
.fs-card ul li::before {
  content: '›';
  position: absolute; left: 0;
  color: var(--accent);
}
.fs-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-tools span {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 10px;
  border-radius: var(--radius);
}

/* ── PROJECTS ────────────────────────────────────────────────── */
#projects { background: var(--bg); }
.project-filters {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 48px;
}
.filter-btn {
  font-family: var(--ff-cond);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px var(--accent-glow);
}
.pc-image {
  height: 200px;
  background: var(--bg-3);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pc-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.project-card:hover .pc-image img { transform: scale(1.05); }
.pc-image-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--border-2);
}
.pc-image-placeholder span { font-size: 48px; }
.pc-image-placeholder small {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  max-width: 200px;
}
.pc-badge {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent);
  color: #000;
  padding: 4px 10px;
  border-radius: var(--radius);
}
.pc-body { padding: 24px; }
.pc-category {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pc-title {
  font-family: var(--ff-cond);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
  color: var(--text);
}
.pc-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 20px;
}
.pc-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.pc-tool {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 2px;
}
.pc-cta {
  font-family: var(--ff-cond);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 6px;
}
.pc-cta::after { content: '→'; transition: transform 0.2s; }
.project-card:hover .pc-cta::after { transform: translateX(4px); }

/* ── PROJECT MODAL ───────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
}
.modal-content {
  position: relative; z-index: 1;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  max-width: 800px; width: calc(100% - 40px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 48px;
}
.modal-close {
  position: absolute; top: 16px; right: 20px;
  font-size: 28px; color: var(--text-3);
  transition: color 0.2s;
  z-index: 2;
}
.modal-close:hover { color: var(--accent); }
.modal-tag {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.modal-title {
  font-family: var(--ff-display);
  font-size: clamp(28px, 4vw, 48px);
  margin-bottom: 24px;
  letter-spacing: 0.03em;
}
.modal-section { margin-bottom: 28px; }
.modal-section h4 {
  font-family: var(--ff-cond);
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.modal-section p, .modal-section li {
  font-size: 15px; color: var(--text-2); line-height: 1.7;
  margin-bottom: 8px;
}
.modal-section ul { padding-left: 16px; list-style: none; }
.modal-section ul li::before { content: '→ '; color: var(--accent); }
.modal-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.modal-tool {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 12px;
  border-radius: var(--radius);
}
.modal-results {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-top: 8px;
}
.modal-result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
}
.modal-result-card strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 28px;
  color: var(--accent);
}
.modal-result-card span { font-size: 13px; color: var(--text-3); }

/* ── WORKFLOW ────────────────────────────────────────────────── */
#workflow { background: var(--bg-2); overflow: hidden; }
.workflow-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  justify-content: center;
}
.workflow-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 140px;
  text-align: center;
  position: relative;
  transition: border-color 0.2s, transform 0.3s var(--ease-out);
  cursor: default;
}
.workflow-step::before {
  content: attr(data-step);
  position: absolute;
  top: 8px; right: 10px;
  font-family: var(--ff-mono);
  font-size: 9px;
  color: var(--text-3);
  letter-spacing: 0.1em;
}
.workflow-step:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.ws-icon { font-size: 32px; }
.ws-content strong {
  display: block;
  font-family: var(--ff-cond);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}
.ws-content span { font-size: 11px; color: var(--text-3); line-height: 1.4; }
.workflow-arrow {
  font-size: 24px;
  color: var(--accent);
  padding: 0 8px;
  font-weight: 300;
  flex-shrink: 0;
}

/* ── GALLERY ─────────────────────────────────────────────────── */
#gallery { background: var(--bg); }
.gallery-hint {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 32px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
}
.gallery-hint code {
  color: var(--accent);
  font-size: 11px;
}
.gallery-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.gallery-filter {
  font-family: var(--ff-cond);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.gallery-filter.active, .gallery-filter:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.gallery-grid {
  columns: 3;
  column-gap: 16px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex; align-items: flex-end;
  padding: 16px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-placeholder-item {
  aspect-ratio: 4/3;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: var(--text-3);
  font-family: var(--ff-mono);
  font-size: 11px;
  text-align: center;
  padding: 20px;
}

/* ── LIGHTBOX ────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox[hidden] { display: none; }
.lb-close {
  position: absolute; top: 20px; right: 24px;
  font-size: 36px; color: var(--text-2);
  transition: color 0.2s;
}
.lb-close:hover { color: var(--accent); }
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 48px; color: var(--text-2);
  padding: 16px;
  transition: color 0.2s;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-prev:hover, .lb-next:hover { color: var(--accent); }
.lb-img-wrap { max-width: 1000px; max-height: 80vh; }
.lb-img-wrap img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: var(--radius); }
.lb-caption {
  position: absolute; bottom: 24px;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.1em;
}

/* ── RESUME ──────────────────────────────────────────────────── */
#resume { background: var(--bg-2); }
.resume-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.resume-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.resume-header-preview {
  background: var(--bg-3);
  border-bottom: 2px solid var(--accent);
  padding: 28px;
  text-align: center;
}
.rh-name {
  font-family: var(--ff-display);
  font-size: 28px;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.rh-title { font-size: 14px; color: var(--text-2); margin: 4px 0; }
.rh-contact { font-family: var(--ff-mono); font-size: 11px; color: var(--text-3); }
.resume-sections-preview { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.rsp-row {
  display: flex; gap: 12px;
  font-size: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.rsp-row strong { color: var(--text); min-width: 110px; flex-shrink: 0; }
.rsp-row span { color: var(--text-2); }
.resume-actions { display: flex; flex-direction: column; gap: 24px; }
.resume-actions p { font-size: 16px; color: var(--text-2); line-height: 1.7; }
.resume-links { display: flex; gap: 20px; }
.resume-link {
  font-family: var(--ff-cond);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.resume-link:hover { color: var(--accent); border-color: var(--accent); }

/* ── CONTACT ─────────────────────────────────────────────────── */
#contact { background: var(--bg); }
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-lead {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 40px;
}
.contact-details { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex; align-items: center; gap: 20px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s;
}
.contact-item:hover { border-color: var(--border-2); }
.ci-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--accent);
  flex-shrink: 0;
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 700;
}
.contact-item strong { display: block; font-size: 13px; font-family: var(--ff-cond); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
.contact-item span { font-size: 14px; color: var(--text-2); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-family: var(--ff-cond);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.form-group input, .form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-note {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--ff-mono);
  line-height: 1.5;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
#footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo {
  font-family: var(--ff-display);
  font-size: 36px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 14px; color: var(--text-3); line-height: 1.6; }
.footer-nav strong, .footer-contact strong {
  font-family: var(--ff-cond);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  display: block;
  margin-bottom: 16px;
}
.footer-nav ul, .footer-contact ul { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a, .footer-contact a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s;
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-3);
  font-family: var(--ff-mono);
}
.back-to-top {
  color: var(--accent);
  transition: opacity 0.2s;
  font-size: 12px;
  letter-spacing: 0.1em;
}
.back-to-top:hover { opacity: 0.7; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-sidebar { order: -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .resume-layout { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 120px 1fr; }
}

@media (max-width: 768px) {
  :root { --section-py: 80px; }
  #hero { flex-direction: column-reverse; align-items: flex-start; padding-top: 100px; }
  .hero-profile { width: 100%; flex-direction: row; gap: 24px; }
  .profile-frame { width: 140px; aspect-ratio: 1; border-radius: 50%; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 20px clamp(20px, 4vw, 60px);
    gap: 16px;
  }
  .nav-hamburger { display: flex; }
  .about-sidebar { grid-template-columns: 1fr; }
  .about-pillars { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; padding-left: 0; }
  .timeline-date { padding-top: 0; }
  .timeline { padding-left: 24px; }
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { columns: 2; }
  .workflow-track { flex-direction: column; }
  .workflow-arrow { transform: rotate(90deg); }
  .stats-bar { flex-direction: column; }
  .stat-divider { width: 100%; height: 1px; }
}

@media (max-width: 480px) {
  .gallery-grid { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-stats { justify-content: space-around; width: 100%; }
}
