/* ── VARIABLES ────────────────────────────────────────────── */
:root {
  --bg:#0a0a0f; --surface:#111118; --surface2:#18181f;
  --border:rgba(255,255,255,0.07); --border2:rgba(255,255,255,0.14);
  --text:#f0eee8; --muted:#7a7875; --accent:#ff5533; --accent2:#ff8866; --green:#22dd77;
  --mono:'Space Mono',monospace; --sans:'Syne',sans-serif;
  --tr:background .35s ease,color .35s ease,border-color .35s ease;
}
body.light {
  --bg:#f4f2ee; --surface:#fff; --surface2:#eceae5;
  --border:rgba(0,0,0,0.08); --border2:rgba(0,0,0,0.16);
  --text:#1a1916; --muted:#777470; --green:#18a858;
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  background:var(--bg); color:var(--text);
  font-family:var(--sans); line-height:1.6;
  overflow-x:hidden; transition:var(--tr);
}
body::before {
  content:''; position:fixed; inset:0;
  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)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events:none; z-index:0; opacity:.5;
}

/* ── NAV ──────────────────────────────────────────────────── */
nav {
  position:fixed; top:0; left:0; right:0; z-index:100;
  padding:1.1rem 2rem; display:flex;
  justify-content:space-between; align-items:center;
  border-bottom:1px solid var(--border); transition:var(--tr);
}
body.dark nav { background:rgba(10,10,15,.85); backdrop-filter:blur(22px); }
body.light nav { background:rgba(244,242,238,.9); backdrop-filter:blur(22px); }

.nav-logo {
  font-family:var(--mono); font-size:.82rem;
  color:var(--accent); letter-spacing:.05em; text-decoration:none;
}
.nav-right { display:flex; align-items:center; gap:1.25rem; }
.nav-links { display:flex; gap:1.75rem; list-style:none; }
.nav-links a {
  font-size:.73rem; letter-spacing:.12em; text-transform:uppercase;
  color:var(--muted); text-decoration:none; transition:color .2s;
}
.nav-links a:hover { color:var(--text); }

/* Lang switcher */
.lang-switch {
  display:flex; border:1px solid var(--border2);
  border-radius:3px; overflow:hidden;
}
.lang-btn {
  background:none; border:none;
  border-right:1px solid var(--border2);
  padding:.28rem .55rem; font-family:var(--mono);
  font-size:.6rem; letter-spacing:.1em; text-transform:uppercase;
  color:var(--muted); cursor:pointer; transition:all .2s;
}
.lang-btn:last-child { border-right:none; }
.lang-btn.active { background:var(--accent); color:#fff; }
.lang-btn:not(.active):hover { color:var(--text); }

/* Theme toggle */
.theme-toggle {
  width:32px; height:32px; border:1px solid var(--border2);
  border-radius:3px; background:none; color:var(--muted);
  cursor:pointer; display:flex; align-items:center;
  justify-content:center; font-size:.95rem;
  transition:all .2s; flex-shrink:0;
}
.theme-toggle:hover { color:var(--text); border-color:var(--accent); }

/* Hamburger */
.hamburger {
  display:none; background:none; border:none;
  cursor:pointer; flex-direction:column; gap:5px; padding:4px;
}
.hamburger span { display:block; width:22px; height:1.5px; background:var(--text); transition:all .3s; }
.hamburger.open span:nth-child(1) { transform:translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity:0; }
.hamburger.open span:nth-child(3) { transform:translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display:none; position:fixed; top:60px; left:0; right:0; z-index:99;
  padding:1.25rem 2rem; border-bottom:1px solid var(--border); transition:var(--tr);
}
body.dark .mobile-menu { background:rgba(10,10,15,.97); backdrop-filter:blur(20px); }
body.light .mobile-menu { background:rgba(244,242,238,.97); backdrop-filter:blur(20px); }
.mobile-menu.open { display:block; }
.mobile-menu a {
  display:block; padding:.7rem 0; font-size:.85rem;
  letter-spacing:.1em; text-transform:uppercase;
  color:var(--muted); text-decoration:none;
  border-bottom:1px solid var(--border); transition:color .2s;
}
.mobile-menu a:last-of-type { border-bottom:none; }
.mobile-menu a:hover { color:var(--text); }
.mobile-bottom {
  display:flex; align-items:center; gap:.75rem;
  padding-top:1rem; margin-top:.5rem; border-top:1px solid var(--border);
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  min-height:100vh; display:flex; align-items:center;
  padding:8rem 2rem 4rem; position:relative; overflow:hidden;
}
.hero-grid {
  position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(255,85,51,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,85,51,.04) 1px, transparent 1px);
  background-size:60px 60px;
  mask-image:radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
}
.hero-glow {
  position:absolute; width:700px; height:700px;
  background:radial-gradient(circle, rgba(255,85,51,.07) 0%, transparent 70%);
  top:-150px; right:-200px; pointer-events:none;
}
.hero-content { max-width:1100px; margin:0 auto; width:100%; position:relative; z-index:1; }
.hero-tag {
  font-family:var(--mono); font-size:.7rem; color:var(--accent);
  letter-spacing:.2em; text-transform:uppercase;
  margin-bottom:1.5rem; display:flex; align-items:center; gap:.75rem;
}
.hero-tag::before { content:''; display:block; width:32px; height:1px; background:var(--accent); }
.hero-name { font-size:clamp(3.5rem,10vw,8rem); font-weight:800; line-height:.9; letter-spacing:-.03em; margin-bottom:.5rem; }
.hero-name .accent { color:var(--accent); }
.hero-title {
  font-family:var(--mono); font-size:clamp(.8rem,2vw,1rem);
  color:var(--muted); margin:1.5rem 0 2.5rem;
  letter-spacing:.05em; min-height:1.8em;
}
.cursor {
  display:inline-block; width:2px; height:1.05em;
  background:var(--accent); vertical-align:text-bottom;
  animation:blink 1s step-end infinite; margin-left:2px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-cta { display:flex; gap:1rem; flex-wrap:wrap; }
.btn {
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.72rem 1.7rem; font-family:var(--mono); font-size:.73rem;
  letter-spacing:.1em; text-transform:uppercase; text-decoration:none;
  border-radius:2px; transition:all .25s; cursor:pointer; border:none;
}
.btn-primary { background:var(--accent); color:#fff; }
.btn-primary:hover { background:var(--accent2); transform:translateY(-2px); }
.btn-outline { background:transparent; color:var(--text); border:1px solid var(--border2); }
.btn-outline:hover { border-color:var(--accent); color:var(--accent); transform:translateY(-2px); }

.hero-scroll {
  position:absolute; bottom:2.5rem; left:50%;
  transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:.5rem;
  color:var(--muted); font-family:var(--mono); font-size:.6rem;
  letter-spacing:.2em; text-transform:uppercase;
  animation:float 2s ease-in-out infinite;
}
.scroll-line { width:1px; height:36px; background:linear-gradient(to bottom, var(--accent), transparent); }
@keyframes float {
  0%,100% { transform:translateX(-50%) translateY(0); }
  50%      { transform:translateX(-50%) translateY(8px); }
}

/* ── SECTIONS ─────────────────────────────────────────────── */
.section-wrap { padding:6rem 2rem; max-width:1100px; margin:0 auto; }
.section-label {
  font-family:var(--mono); font-size:.67rem; letter-spacing:.25em;
  text-transform:uppercase; color:var(--accent);
  margin-bottom:.75rem; display:flex; align-items:center; gap:.75rem;
}
.section-label::before { content:''; width:24px; height:1px; background:var(--accent); }
.section-title { font-size:clamp(2rem,5vw,3.5rem); font-weight:800; letter-spacing:-.02em; line-height:1; margin-bottom:3rem; }
.divider { width:100%; height:1px; background:var(--border); }

/* ── ABOUT ────────────────────────────────────────────────── */
.about-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:4rem; align-items:start; }
.about-text p { color:var(--muted); line-height:1.88; margin-bottom:1.2rem; font-size:.98rem; }
.about-text p strong { color:var(--text); font-weight:700; }
.about-skills { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:2rem; }
.skill-tag {
  padding:.28rem .75rem; font-family:var(--mono); font-size:.66rem;
  letter-spacing:.08em; border:1px solid var(--border2);
  color:var(--muted); border-radius:2px; transition:all .2s;
}
.skill-tag:hover { border-color:var(--accent); color:var(--accent); }

.about-cards { display:flex; flex-direction:column; gap:.85rem; }
.about-card {
  padding:1.25rem 1.4rem; border:1px solid var(--border);
  background:var(--surface); border-radius:4px;
  position:relative; overflow:hidden;
  transition:border-color .3s, var(--tr);
}
.about-card::before {
  content:''; position:absolute; top:0; left:0;
  width:3px; height:100%; background:var(--accent);
}
.about-card:hover { border-color:var(--border2); }
.card-icon { font-size:1.2rem; margin-bottom:.5rem; display:block; }
.card-title { font-size:.75rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; margin-bottom:.35rem; color:var(--text); }
.card-body { font-family:var(--mono); font-size:.68rem; color:var(--muted); line-height:1.75; }
.card-body .hi { color:var(--accent2); }

/* ── PROJECTS ─────────────────────────────────────────────── */
.projects-grid { display:grid; gap:1.5rem; }

.project-card {
  border:1px solid var(--border); background:var(--surface);
  border-radius:4px; overflow:hidden; text-decoration:none;
  color:inherit; transition:all .3s, var(--tr);
  position:relative; display:flex; flex-direction:column;
}
.project-card::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(135deg, rgba(255,85,51,.03) 0%, transparent 60%);
  opacity:0; transition:opacity .3s; pointer-events:none;
}
.project-card:hover {
  border-color:rgba(255,85,51,.3);
  transform:translateY(-3px);
  box-shadow:0 12px 40px rgba(0,0,0,.2);
}
.project-card:hover::after { opacity:1; }
.project-card.featured { border-color:rgba(255,85,51,.2); background:var(--surface2); }

/* GIF zone */
.card-gif {
  position:relative; width:100%; height:200px;
  background:var(--surface2); overflow:hidden;
  flex-shrink:0; border-bottom:1px solid var(--border);
}
.card-gif img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .4s ease; }
.project-card:hover .card-gif img { transform:scale(1.04); }
.gif-drop-zone {
  width:100%; height:100%; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:.6rem;
  cursor:pointer; transition:background .2s;
}
.gif-drop-zone:hover { background:rgba(255,85,51,.04); }
.gif-drop-icon {
  width:44px; height:44px; border:1.5px dashed var(--border2);
  border-radius:4px; display:flex; align-items:center;
  justify-content:center; font-size:1.2rem;
  color:var(--muted); transition:all .2s;
}
.gif-drop-zone:hover .gif-drop-icon { border-color:var(--accent); color:var(--accent); }
.gif-drop-label { font-family:var(--mono); font-size:.62rem; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.gif-drop-sub { font-family:var(--mono); font-size:.56rem; color:var(--border2); letter-spacing:.06em; }
.gif-x {
  position:absolute; top:8px; right:8px;
  width:24px; height:24px; background:rgba(10,10,15,.75);
  border:1px solid var(--border2); border-radius:2px;
  display:none; align-items:center; justify-content:center;
  font-size:.65rem; color:var(--muted); cursor:pointer;
  transition:all .2s; backdrop-filter:blur(4px); z-index:2;
}
.gif-x:hover { background:rgba(255,85,51,.85); color:#fff; border-color:transparent; }

/* Card body */
.card-body-inner { padding:1.6rem 2rem 1.8rem; flex:1; display:flex; flex-direction:column; }
.project-number { font-family:var(--mono); font-size:.6rem; color:var(--accent); letter-spacing:.1em; margin-bottom:.55rem; }
.project-name { font-size:1.25rem; font-weight:700; letter-spacing:-.01em; margin-bottom:.5rem; transition:color .2s; }
.project-card:hover .project-name { color:var(--accent2); }
.project-desc { color:var(--muted); font-size:.9rem; line-height:1.78; margin-bottom:1.1rem; flex:1; }
.card-footer { display:flex; justify-content:space-between; align-items:flex-end; gap:1rem; margin-top:auto; }
.project-tags { display:flex; gap:.4rem; flex-wrap:wrap; }
.tag {
  padding:.17rem .58rem; font-family:var(--mono); font-size:.61rem;
  letter-spacing:.1em; text-transform:uppercase;
  background:rgba(255,85,51,.08); color:var(--accent2); border-radius:2px;
}
.project-arrow {
  width:36px; height:36px; border:1px solid var(--border2);
  border-radius:2px; display:flex; align-items:center;
  justify-content:center; color:var(--muted);
  transition:all .3s; flex-shrink:0; font-size:1rem;
}
.project-card:hover .project-arrow { border-color:var(--accent); color:var(--accent); transform:rotate(45deg); }
.featured-badge {
  display:inline-block; padding:.17rem .58rem; font-family:var(--mono);
  font-size:.57rem; letter-spacing:.15em; text-transform:uppercase;
  background:rgba(34,221,119,.1); color:var(--green);
  border-radius:2px; margin-bottom:.55rem;
}
.gif-upload-btn {
  background:none; border:1px dashed var(--border2);
  color:var(--muted); font-family:var(--mono); font-size:.58rem;
  letter-spacing:.1em; text-transform:uppercase;
  padding:.28rem .7rem; border-radius:2px; cursor:pointer;
  transition:all .2s; white-space:nowrap; flex-shrink:0;
}
.gif-upload-btn:hover { border-color:var(--accent); color:var(--accent); }

/* ── CONTACT ──────────────────────────────────────────────── */
.contact-section { padding:6rem 2rem; border-top:1px solid var(--border); text-align:center; }
.contact-section .section-label { justify-content:center; }
.contact-section .section-label::before { display:none; }
.contact-email {
  font-size:clamp(1.1rem,3vw,2.4rem); font-weight:800;
  letter-spacing:-.02em; color:var(--text); text-decoration:none;
  border-bottom:3px solid var(--accent); padding-bottom:.1em;
  transition:color .2s; display:inline-block; margin:1.5rem 0;
}
.contact-email:hover { color:var(--accent); }
.social-links { display:flex; justify-content:center; gap:.85rem; margin-top:2.25rem; flex-wrap:wrap; }
.social-link {
  display:flex; align-items:center; gap:.5rem;
  padding:.6rem 1.3rem; font-family:var(--mono); font-size:.7rem;
  letter-spacing:.1em; text-transform:uppercase;
  color:var(--muted); text-decoration:none;
  border:1px solid var(--border); border-radius:2px; transition:all .25s;
}
.social-link:hover { color:var(--text); border-color:var(--border2); transform:translateY(-2px); }

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  padding:1.75rem 2rem; border-top:1px solid var(--border);
  display:flex; justify-content:space-between; align-items:center;
  max-width:1100px; margin:0 auto;
}
.footer-mono { font-family:var(--mono); font-size:.67rem; color:var(--muted); letter-spacing:.05em; }

/* ── REVEAL ANIMATION ─────────────────────────────────────── */
.reveal { opacity:0; transform:translateY(26px); transition:opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width:820px) {
  .nav-links { display:none; }
  .hamburger { display:flex; }
  .about-grid { grid-template-columns:1fr; gap:2.5rem; }
  footer { flex-direction:column; gap:.65rem; text-align:center; }
  .hero { padding:7rem 1.5rem 4rem; }
  .section-wrap { padding:4rem 1.5rem; }
  .contact-section { padding:4rem 1.5rem; }
  .card-body-inner { padding:1.2rem 1.4rem 1.4rem; }
}
@media (max-width:480px) {
  .hero-cta { flex-direction:column; align-items:flex-start; }
  .about-cards { display:grid; grid-template-columns:1fr 1fr; }
}
