/* ============================================
   ALI ITAWI — PORTFOLIO V3
   Philosophy · 3D · Precision
   ============================================ */

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

:root {
  --bg:        #06060d;
  --bg2:       #09091a;
  --accent:    #4fc3f7;
  --accent2:   #7c3aed;
  --gold:      #fbbf24;
  --white:     #ffffff;
  --muted:     rgba(255,255,255,0.42);
  --border:    rgba(255,255,255,0.065);
  --card:      rgba(255,255,255,0.022);
  --font:      'Inter', sans-serif;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   LOADER
   ============================================ */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .9s var(--ease), visibility .9s var(--ease);
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }

/* Subtle grid bg */
.loader-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79,195,247,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,195,247,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.loader-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 0; position: relative; z-index: 2;
}

/* Cycling Greek symbol */
.loader-symbol {
  font-size: 13px; font-weight: 900; font-style: italic;
  color: var(--accent); letter-spacing: .3em; text-transform: uppercase;
  opacity: 0; transform: translateY(-8px);
  animation: loaderSymbolIn .5s var(--ease) .1s forwards;
  margin-bottom: 28px;
  text-shadow: 0 0 24px rgba(79,195,247,.6);
  transition: opacity .18s ease;
}

/* Big name */
.loader-name {
  display: flex; flex-direction: column; align-items: center;
  gap: 0; line-height: .88;
  margin-bottom: 28px;
}
.loader-name-a,
.loader-name-b {
  display: flex;
  font-size: clamp(56px, 12vw, 120px);
  font-weight: 900; letter-spacing: -.03em;
}
.loader-name-a span,
.loader-name-b span {
  opacity: 0; transform: translateY(40px);
  display: inline-block;
  animation: loaderLetterIn .6s var(--ease) forwards;
}
/* Stagger each letter */
.loader-name-a span:nth-child(1) { animation-delay: .15s; }
.loader-name-a span:nth-child(2) { animation-delay: .22s; }
.loader-name-a span:nth-child(3) { animation-delay: .29s; }
.loader-name-a { color: var(--white); }
.loader-name-b span:nth-child(1) { animation-delay: .36s; }
.loader-name-b span:nth-child(2) { animation-delay: .43s; }
.loader-name-b span:nth-child(3) { animation-delay: .50s; }
.loader-name-b span:nth-child(4) { animation-delay: .57s; }
.loader-name-b span:nth-child(5) { animation-delay: .64s; }
.loader-name-b {
  -webkit-text-stroke: 2px rgba(255,255,255,.85);
  color: transparent;
}

/* Concept word under name */
.loader-concept {
  font-size: 10px; font-weight: 800; letter-spacing: .45em; text-transform: uppercase;
  color: rgba(79,195,247,.5);
  opacity: 0; animation: loaderSymbolIn .5s var(--ease) .72s forwards;
  margin-bottom: 44px;
  transition: opacity .18s ease;
}

/* Progress bar */
.loader-progress {
  width: 240px; height: 1px;
  background: rgba(255,255,255,.08);
  position: relative; overflow: hidden;
  margin-bottom: 14px;
}
.loader-progress-fill {
  position: absolute; left: 0; top: 0;
  height: 100%; width: 0%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(79,195,247,.8);
  transition: width .05s linear;
}

/* Percentage */
.loader-percent {
  font-size: 11px; font-weight: 700; letter-spacing: .2em;
  color: rgba(79,195,247,.5);
  font-variant-numeric: tabular-nums;
  opacity: 0; animation: loaderSymbolIn .4s ease .8s forwards;
}

@keyframes loaderLetterIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes loaderSymbolIn {
  to { opacity: 1; transform: translateY(0); }
}


/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed; top: 0; width: 100%; z-index: 800;
  padding: 28px 64px;
  display: flex; align-items: center; justify-content: space-between;
  transition: padding .3s ease, background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 16px 64px;
  background: rgba(6,6,13,.88); backdrop-filter: blur(24px);
  border-color: var(--border);
}
.nav-links { display: flex; gap: 44px; }
.nav-link {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .2s;
}
.nav-link:hover { color: var(--white); }
.nav-cv {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  padding: 10px 22px; border: 1px solid rgba(79,195,247,.28); border-radius: 6px;
  transition: all .2s ease;
}
.nav-cv:hover { background: rgba(79,195,247,.08); border-color: var(--accent); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative; height: 100vh; min-height: 700px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-noise {
  position: absolute; inset: 0; opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1;
}
.hero-content {
  position: relative; z-index: 10;
  text-align: center; padding: 0 40px; max-width: 1000px;
}
.hero-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .35em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 28px; opacity: 0; transform: translateY(16px);
}
.hero-tag.go { animation: fadeUp .7s var(--ease) .2s forwards; }
.hero-name {
  display: flex; flex-direction: column; align-items: center;
  font-size: clamp(80px,13vw,172px); font-weight: 900;
  line-height: .88; letter-spacing: -.03em; margin-bottom: 36px;
}
.name-line { display: block; opacity: 0; transform: translateY(48px); }
.name-solid { color: var(--white); }
.name-outline { -webkit-text-stroke: 2px rgba(255,255,255,.9); color: transparent; }
.name-line.go { animation: fadeUp .9s var(--ease) forwards; }
.reveal-name1.go { animation-delay: .4s; }
.reveal-name2.go { animation-delay: .6s; }
.hero-sub {
  font-size: 14px; font-weight: 400; letter-spacing: .08em; color: var(--muted);
  margin-bottom: 36px; opacity: 0; transform: translateY(16px);
}
.hero-sub.go { animation: fadeUp .7s var(--ease) .85s forwards; }
.hero-pills {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 52px; opacity: 0; transform: translateY(16px);
}
.hero-pills.go { animation: fadeUp .7s var(--ease) 1s forwards; }
.pill {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 8px 18px;
  border: 1px solid var(--border); border-radius: 100px; background: var(--card);
}
.hero-actions {
  display: flex; gap: 14px; justify-content: center;
  opacity: 0; transform: translateY(16px);
}
.hero-actions.go { animation: fadeUp .7s var(--ease) 1.15s forwards; }
.btn-primary {
  display: inline-flex; align-items: center; padding: 15px 36px;
  background: var(--accent); color: var(--bg);
  font-size: 13px; font-weight: 700; letter-spacing: .05em; text-decoration: none;
  border-radius: 8px; transition: all .25s ease;
}
.btn-primary:hover { background: #fff; transform: translateY(-3px); box-shadow: 0 16px 40px rgba(79,195,247,.2); }
.btn-ghost {
  display: inline-flex; align-items: center; padding: 15px 36px;
  border: 1px solid var(--border); color: var(--white);
  font-size: 13px; font-weight: 600; letter-spacing: .05em;
  text-decoration: none; border-radius: 8px; background: transparent; transition: all .25s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.hero-scroll {
  position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%);
  z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; animation: fadeIn 1s ease 2s forwards;
}
.scroll-label { font-size: 10px; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.scroll-track { width: 1px; height: 56px; background: var(--border); position: relative; overflow: hidden; }
.scroll-thumb { position: absolute; top: -100%; width: 100%; height: 100%; background: var(--accent); animation: scrollDown 1.8s ease-in-out infinite; }
@keyframes scrollDown { 0% { top: -100%; } 100% { top: 100%; } }

/* ============================================
   SHARED SECTION PRIMITIVES
   ============================================ */
section:not(.hero) { padding: 160px 0; position: relative; overflow: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 64px; position: relative; z-index: 2; }

/* Philosophical concept row */
.about-top, .skills-top, .projects-top, .contact-concept {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 56px;
}
.concept-symbol {
  font-size: 22px; font-weight: 900; color: var(--accent);
  font-style: italic; line-height: 1;
  text-shadow: 0 0 20px rgba(79,195,247,.5);
}
.concept-name {
  font-size: 11px; font-weight: 800; letter-spacing: .35em; text-transform: uppercase;
  color: var(--accent);
}
.concept-rule { flex: 1; height: 1px; background: rgba(79,195,247,.2); max-width: 80px; }
.concept-quote {
  font-size: 13px; font-weight: 300; font-style: italic;
  color: var(--muted); letter-spacing: .02em;
}

.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255,255,255,.35); margin-bottom: 16px;
}
.section-title {
  font-size: clamp(48px,6vw,88px); font-weight: 900;
  letter-spacing: -.03em; line-height: .95; margin-bottom: 80px;
}

/* Reveal */
.js-reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js-reveal.visible { opacity: 1; transform: none; }

/* ============================================
   ABOUT
   ============================================ */
.about { background: var(--bg); }

#aboutCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}

.about-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; margin-bottom: 100px; align-items: center;
}
.about-left { display: flex; flex-direction: column; gap: 52px; }
.about-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-frame {
  position: relative;
  width: 400px;
  height: 500px;
  flex-shrink: 0;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 24px;
  display: block;
  position: relative;
  z-index: 2;
  filter: grayscale(15%);
  transition: filter .4s ease;
}

.profile-frame:hover .profile-img {
  filter: grayscale(0%);
}

/* Glowing accent border */
.profile-border {
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent2), transparent 60%);
  z-index: 1;
  opacity: .5;
}

/* Soft glow behind the photo */
.profile-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(79,195,247,.12), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.about-copy p {
  font-size: 17px; line-height: 1.9; color: rgba(255,255,255,.62);
  margin-bottom: 22px; font-weight: 300;
}
.about-copy p:first-child { font-size: 19px; color: rgba(255,255,255,.75); font-weight: 400; }
.about-copy strong { color: var(--white); font-weight: 700; }

.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
  background: var(--border);
}
.stat-card {
  padding: 36px 28px; background: var(--bg);
  display: flex; flex-direction: column; gap: 10px;
  transition: background .3s ease; position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(79,195,247,.07), transparent 70%);
  opacity: 0; transition: opacity .4s ease;
}
.stat-card:hover { background: rgba(79,195,247,.025); }
.stat-card:hover::after { opacity: 1; }
.stat-num {
  font-size: 60px; font-weight: 900; letter-spacing: -.04em; line-height: 1;
  color: var(--accent); text-shadow: 0 0 40px rgba(79,195,247,.4);
}
.stat-label {
  font-size: 10px; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--muted);
}

/* Timeline */
.timeline { padding-left: 48px; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 1px; height: calc(100% - 20px);
  background: linear-gradient(to bottom, var(--accent), rgba(79,195,247,.04));
}
.timeline-item {
  position: relative; padding: 32px 0;
  border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: start;
}
.timeline-item:last-child { border-bottom: none; }
.tl-dot {
  position: absolute; left: -54px; top: 38px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(79,195,247,.1), 0 0 20px rgba(79,195,247,.5);
  animation: dotPulse 3s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(79,195,247,.1), 0 0 20px rgba(79,195,247,.4); }
  50%      { box-shadow: 0 0 0 8px rgba(79,195,247,.05), 0 0 32px rgba(79,195,247,.8); }
}
.tl-date {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); padding-top: 4px;
}
.tl-body h3 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.tl-body span { font-size: 14px; color: var(--muted); }

/* ============================================
   SKILLS
   ============================================ */
.skills { background: var(--bg2); }

#skillsBgCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: .4;
}

/* 3D Sphere centerpiece */
.sphere-wrap {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 80px; position: relative;
}
#skills3dCanvas {
  width: 500px !important; height: 500px !important;
  display: block;
  filter: drop-shadow(0 0 60px rgba(79,195,247,.15));
}
.sphere-label {
  font-size: 10px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(79,195,247,.4); margin-top: 8px;
}

.skills-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.skill-col {
  background: rgba(255,255,255,.022); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 28px;
  transition: border-color .35s ease, background .35s ease, transform .35s ease;
  position: relative; overflow: hidden;
}
.skill-col::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity .4s ease;
}
.skill-col:hover { border-color: rgba(79,195,247,.22); background: rgba(79,195,247,.03); transform: translateY(-6px); }
.skill-col:hover::before { opacity: 1; }
.skill-col-title {
  font-size: 10px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 28px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.skill-list { list-style: none; display: flex; flex-direction: column; }
.skill-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,.7);
  transition: color .2s ease, padding-left .25s ease; cursor: default;
  position: relative;
}
.skill-item:last-child { border-bottom: none; }
.skill-item::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--accent); transition: width .4s ease;
}
.skill-item:hover { color: var(--white); padding-left: 8px; }
.skill-item:hover::after { width: 32px; }
.skill-ctx {
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(79,195,247,.32); transition: color .2s; white-space: nowrap;
}
.skill-item:hover .skill-ctx { color: rgba(79,195,247,.7); }

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

#projectsBgCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: .35;
}

.projects-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 20px;
}
.project-card {
  border: 1px solid var(--border); border-radius: 20px;
  background: var(--card); overflow: hidden; position: relative;
  transition: border-color .35s ease, box-shadow .35s ease;
  transform-style: preserve-3d; will-change: transform;
}
.project-card:hover {
  border-color: rgba(79,195,247,.22);
  box-shadow: 0 32px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(79,195,247,.06);
}
.project-featured {
  grid-column: span 3;
  background: linear-gradient(135deg, rgba(79,195,247,.04), rgba(124,58,237,.04));
}
.card-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 25% 50%, rgba(79,195,247,.08), transparent 65%);
  pointer-events: none;
}
.card-num {
  position: absolute; top: -14px; right: 24px;
  font-size: 110px; font-weight: 900; letter-spacing: -.05em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.04);
  pointer-events: none; user-select: none; z-index: 0;
  transition: -webkit-text-stroke-color .3s ease;
}
.project-card:hover .card-num { -webkit-text-stroke-color: rgba(79,195,247,.07); }
.card-body {
  padding: 40px; height: 100%; display: flex; flex-direction: column;
  position: relative; z-index: 1;
}
.project-featured .card-body { padding: 56px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px;
}
.award-badge {
  font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold); text-shadow: 0 0 20px rgba(251,191,36,.4);
}
.card-link {
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  color: var(--muted); text-decoration: none; transition: color .2s;
}
.card-link:hover { color: var(--accent); }
.project-card h3 {
  font-size: 22px; font-weight: 800; letter-spacing: -.025em;
  margin-bottom: 14px; line-height: 1.15;
  transition: color .25s ease;
}
.project-card:hover h3 { color: var(--accent); }
.project-featured h3 { font-size: clamp(28px,3.5vw,44px); }
.project-card p {
  font-size: 14px; line-height: 1.8; color: rgba(255,255,255,.5);
  flex: 1; margin-bottom: 32px;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-top: auto;
}
.tech-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tech-tags span {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); padding: 5px 12px;
  border: 1px solid rgba(79,195,247,.18); border-radius: 100px;
  transition: background .25s ease;
}
.project-card:hover .tech-tags span { background: rgba(79,195,247,.06); }
.card-links { display: flex; gap: 20px; }
.card-links a {
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  color: var(--muted); text-decoration: none; transition: color .2s;
}
.card-links a:hover { color: var(--accent); }

/* All projects CTA card */
.project-all {
  border-style: dashed;
  background: transparent;
  transition: border-color .3s ease, background .3s ease;
}
.project-all:hover {
  background: rgba(79,195,247,.04);
  border-color: rgba(79,195,247,.4);
}
.project-all-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  padding: 40px;
  text-decoration: none;
  color: var(--white);
  text-align: center;
  gap: 16px;
}
.project-all-icon {
  font-size: 36px;
  color: var(--accent);
  transition: transform .3s ease;
}
.project-all:hover .project-all-icon { transform: translateX(6px); }
.project-all-inner h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--white);
  transition: color .25s ease;
}
.project-all:hover .project-all-inner h3 { color: var(--accent); }
.project-all-inner p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ============================================
   CONTACT
   ============================================ */
.contact { background: var(--bg2); text-align: center; }


.contact-concept { justify-content: center; }
.contact-concept .concept-rule { max-width: 48px; }

.contact-title {
  font-size: clamp(56px,9vw,130px); font-weight: 900;
  letter-spacing: -.04em; line-height: .92; margin-bottom: 28px;
}
.contact-title-outline {
  display: block;
  -webkit-text-stroke: 2px rgba(255,255,255,.7); color: transparent;
}
.contact-sub { font-size: 17px; color: var(--muted); margin-bottom: 56px; font-weight: 300; }

.contact-line {
  width: 1px; height: 80px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  margin: 0 auto 56px; opacity: .5;
}
.contact-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 16px; max-width: 920px; margin: 0 auto;
}
.contact-card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 36px 28px;
  border: 1px solid var(--border); border-radius: 18px;
  background: rgba(255,255,255,.02);
  text-decoration: none; color: var(--white);
  position: relative; overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
}
.contact-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity .3s ease;
}
.contact-card:hover { border-color: rgba(79,195,247,.28); transform: translateY(-8px); }
.contact-card:hover::before { opacity: 1; }
.cc-num { font-size: 10px; font-weight: 800; letter-spacing: .2em; color: var(--accent); margin-bottom: 16px; }
.cc-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.cc-arrow { font-size: 22px; color: var(--accent); margin-top: 20px; transition: transform .25s ease; }
.contact-card:hover .cc-arrow { transform: translate(4px,-4px); }

.site-footer {
  display: flex; justify-content: space-between;
  padding: 28px 64px;
  margin-top: 48px;
  border-top: 1px solid var(--border);
  font-size: 12px; font-weight: 500; letter-spacing: .05em; color: var(--muted);
}
.footer-quote {
  font-style: italic; font-weight: 300;
  color: rgba(255,255,255,.28);
}
.contact { padding-bottom: 0 !important; }

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: .7; } }

/* ============================================
   HAMBURGER / MOBILE NAV
   ============================================ */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px;
  background: none; border: none; cursor: pointer; padding: 4px;
  z-index: 900;
}
.nav-hamburger span {
  display: block; width: 24px; height: 1.5px;
  background: var(--white);
  transition: transform .3s ease, opacity .3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6,6,13,.97); backdrop-filter: blur(24px);
  z-index: 700;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 36px;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.nav-mobile.open {
  opacity: 1; pointer-events: all;
}
.nav-mobile-link {
  font-size: 36px; font-weight: 800; letter-spacing: -.02em;
  color: rgba(255,255,255,.6); text-decoration: none;
  transition: color .2s ease;
}
.nav-mobile-link:hover { color: var(--accent); }
.nav-mobile-cv {
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  padding: 12px 28px; border: 1px solid rgba(79,195,247,.35); border-radius: 8px;
  margin-top: 12px;
  transition: background .2s ease;
}
.nav-mobile-cv:hover { background: rgba(79,195,247,.08); }

/* ============================================
   RESPONSIVE
   ============================================ */

/* ── Large tablet ── */
@media (max-width: 1100px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project-featured { grid-column: span 2; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  #skills3dCanvas { width: 380px !important; height: 380px !important; }
  .about-split { gap: 48px; }
}

/* ── Tablet / small laptop ── */
@media (max-width: 900px) {
  /* Nav */
  .nav { padding: 20px 24px; }
  .nav.scrolled { padding: 14px 24px; }
  .nav-links { display: none; }
  .nav-cv { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile { display: flex; }

  /* Sections */
  section:not(.hero) { padding: 100px 0; }
  .container { padding: 0 24px; }

  /* About */
  .about-split {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about-right { order: -1; }
  .profile-frame {
    width: min(340px, 80vw);
    height: auto;
    aspect-ratio: 4/5;
  }

  /* Timeline */
  .timeline { padding-left: 32px; }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .tl-dot { left: -38px; top: 34px; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }
  .project-featured { grid-column: span 1; }
  .project-featured .card-body { padding: 40px; }

  /* Skills */
  #skills3dCanvas { width: 280px !important; height: 280px !important; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .site-footer { padding: 24px 24px; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  /* Nav */
  .nav { padding: 16px 20px; }

  /* Hero */
  .hero-name { font-size: clamp(60px, 17vw, 96px); }
  .hero-sub { font-size: 12px; letter-spacing: .04em; }
  .hero-pills { gap: 7px; }
  .pill { font-size: 10px; padding: 6px 13px; }
  .hero-actions { flex-direction: column; align-items: center; gap: 10px; }
  .btn-primary, .btn-ghost { width: 220px; justify-content: center; padding: 14px 24px; }

  /* Sections */
  section:not(.hero) { padding: 80px 0; }
  .container { padding: 0 18px; }
  .section-title { margin-bottom: 52px; }

  /* Concept row */
  .concept-quote { display: none; }
  .concept-rule { display: none; }
  .about-top, .skills-top, .projects-top, .contact-concept { flex-wrap: wrap; gap: 10px; }

  /* About */
  .profile-frame {
    width: min(280px, 85vw);
    aspect-ratio: 4/5;
    height: auto;
  }
  .about-copy p { font-size: 15px; }
  .about-copy p:first-child { font-size: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 44px; }
  .stat-card { padding: 24px 18px; }

  /* Timeline */
  .timeline { padding-left: 28px; }
  .tl-dot { left: -34px; width: 12px; height: 12px; top: 36px; }
  .tl-body h3 { font-size: 17px; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; }
  #skills3dCanvas { width: min(260px, 85vw) !important; height: min(260px, 85vw) !important; }
  .skill-col { padding: 24px 20px; }

  /* Projects */
  .card-body { padding: 28px; }
  .card-num { font-size: 80px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; max-width: 360px; }
  .contact-title { font-size: clamp(44px, 14vw, 80px); }
  .contact-card { padding: 28px 22px; }

  /* Footer */
  .site-footer { padding: 20px 18px; font-size: 11px; }
}
