/* ===================== RESET & VARIABLES ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* DARK THEME (default) */
body.dark {
  --bg:       #07090d;
  --bg2:      #0d1117;
  --surface:  #111820;
  --border:   rgba(255,255,255,0.07);
  --accent:   #e84040;
  --text:     #f0f4f8;
  --text2:    #8899aa;
  --text3:    #c0cdd8;
  --nav-bg:   rgba(7,9,13,0.94);
  --card-bg:  #111820;
  --shadow:   0 8px 32px rgba(0,0,0,0.5);
}
/* LIGHT THEME */
body.light {
  --bg:       #f4f6fa;
  --bg2:      #eaecf2;
  --surface:  #ffffff;
  --border:   rgba(0,0,0,0.09);
  --accent:   #e84040;
  --text:     #0d1117;
  --text2:    #556070;
  --text3:    #2d3a4a;
  --nav-bg:   rgba(244,246,250,0.94);
  --card-bg:  #ffffff;
  --shadow:   0 8px 32px rgba(0,0,0,0.1);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background 0.35s, color 0.35s;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

/* ===================== NAVBAR ===================== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 0 22px; height: 62px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.15rem;
  letter-spacing: 0.08em; color: var(--text);
}
.logo span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 14px; }

/* Theme toggle */
.theme-toggle { cursor: pointer; display: inline-flex; }
.theme-toggle input { display: none; }
.toggle-track {
  width: 50px; height: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  position: relative;
  display: flex; align-items: center;
}
.t-sun { position: absolute; left: 6px; font-size: 0.65rem; }
.t-moon { position: absolute; right: 6px; font-size: 0.65rem; }
.t-thumb {
  position: absolute; left: 3px;
  width: 20px; height: 20px;
  background: var(--accent); border-radius: 50%;
  transition: transform 0.3s;
}
.theme-toggle input:checked ~ .toggle-track .t-thumb { transform: translateX(24px); }

/* Hamburger */
.hamburger {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; padding: 5px;
}
.hamburger span {
  display: block; width: 23px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all 0.3s;
}

/* ===================== MOBILE MENU ===================== */
.mob-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px;
  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1), opacity 0.38s;
}
/* Dark bg for dark mode */
body.dark .mob-menu  { background: #07090d; }
/* Light bg for light mode */
body.light .mob-menu { background: #f4f6fa; }

.mob-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}
.mob-close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: none;
  font-size: 1.4rem; color: var(--text); cursor: pointer;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.mob-close:hover { background: rgba(232,64,64,0.12); color: var(--accent); }
.mob-link {
  font-family: 'Syne', sans-serif;
  font-size: 1.7rem; font-weight: 700;
  color: var(--text); letter-spacing: 0.02em;
  transition: color 0.2s;
}
.mob-link:hover { color: var(--accent); }
.mob-cta {
  background: var(--accent); color: #fff;
  padding: 13px 36px; border-radius: 8px;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem;
  margin-top: 4px;
}
.mob-icons { display: flex; gap: 18px; }
.mob-icons a { width: 28px; height: 28px; color: var(--text2); transition: color 0.2s; }
.mob-icons a svg { width: 100%; height: 100%; }
.mob-icons a:hover { color: var(--text); }
.mob-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.1rem; letter-spacing: 0.1em;
}
.mob-logo span { color: var(--accent); }

/* ===================== HERO ===================== */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 90px 22px 80px;
  max-width: 1160px; margin: 0 auto;
  position: relative;
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-content {
  animation: fadeUp 0.8s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--text);
  min-height: 1.2em; margin-bottom: 18px;
}
.cursor { color: var(--accent); animation: blink 800ms step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-sub { font-size: 0.98rem; color: var(--text2); max-width: 500px; margin-bottom: 26px; }
.hero-icons { display: flex; gap: 15px; margin-bottom: 44px; }
.hero-icons a { width: 28px; height: 28px; color: var(--text2); transition: color 0.2s, transform 0.2s; }
.hero-icons a svg { width: 100%; height: 100%; }
.hero-icons a:hover { color: var(--text); transform: translateY(-2px); }

.stats { display: flex; flex-wrap: wrap; gap: 28px 44px; padding-bottom: 80px; }
.stat-box { display: flex; flex-direction: column; }
.stat-num-line { display: flex; align-items: baseline; gap: 1px; }
.sn { font-family: 'Syne', sans-serif; font-size: 2.4rem; font-weight: 800; color: var(--text); line-height: 1; }
.ss { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
.sl { font-size: 0.76rem; color: var(--text2); margin-top: 5px; }

.scroll-hint {
  position: absolute; bottom: 20px; left: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 0;
}
.scroll-hint span {
  font-size: 0.68rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text2);
  writing-mode: vertical-rl;
}
.s-line { width: 1px; height: 56px; background: linear-gradient(to bottom, var(--accent), transparent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:0.35} 50%{opacity:1} }

/* ===================== SECTIONS ===================== */
.sec { padding: 96px 0; }

.sec-label { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.sec-title { font-family: 'Syne', sans-serif; font-size: clamp(1.7rem,4vw,2.8rem); font-weight: 800; line-height: 1.2; color: var(--text); margin-bottom: 14px; }
.sec-sub { color: var(--text2); font-size: 0.95rem; max-width: 500px; margin-bottom: 48px; }

/* ===================== BUTTONS ===================== */
.btn-red {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 13px 30px; border-radius: 8px;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.88rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(232,64,64,0.3); }
.btn-outline {
  display: inline-block; border: 1.5px solid var(--border);
  color: var(--text2); padding: 9px 22px; border-radius: 8px;
  font-size: 0.84rem; font-weight: 500; margin-top: 14px;
  transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-submit {
  width: 100%; background: var(--text); color: var(--bg);
  border: none; border-radius: 8px; padding: 13px;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.92rem;
  cursor: pointer; transition: opacity 0.2s;
}
.btn-submit:hover { opacity: 0.85; }
.btn-white {
  display: inline-block; background: #fff; color: var(--accent);
  padding: 13px 30px; border-radius: 8px;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.88rem;
  transition: transform 0.2s, opacity 0.2s;
}
.btn-white:hover { transform: translateY(-2px); opacity: 0.9; }

/* ===================== SERVICES ===================== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 22px; margin-bottom: 56px; }
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 30px 26px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(232,64,64,0.25); }
.card-icon {
  width: 46px; height: 46px; background: rgba(232,64,64,0.1);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 9px; color: var(--text); }
.card p { font-size: 0.86rem; color: var(--text2); line-height: 1.65; margin-bottom: 18px; }
.card-link { font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.card-link:hover { text-decoration: underline; }

.about-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 44px;
}
.ab-left h3, .ab-right h3 { font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 11px; color: var(--text); }
.ab-left p { font-size: 0.88rem; color: var(--text2); margin-bottom: 16px; }
.ab-left ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.ab-left ul li { font-size: 0.86rem; color: var(--text3); }
.ab-right { display: flex; flex-direction: column; justify-content: center; gap: 11px; }
.ab-right p { font-size: 0.88rem; color: var(--text2); }

/* ===================== SKILLS ===================== */
.skills-sec { background: var(--bg2); }
.skills-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.skills-wrap span {
  background: var(--card-bg); border: 1px solid var(--border);
  color: var(--text3); padding: 9px 18px; border-radius: 100px;
  font-size: 0.84rem; font-weight: 500; cursor: default;
  transition: all 0.2s;
}
.skills-wrap span:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ===================== JOURNEY ===================== */
.timeline { position: relative; max-width: 680px; padding-left: 44px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--accent), transparent); }
.t-item { position: relative; padding-bottom: 44px; }
.t-dot { position: absolute; left: -34px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 3px rgba(232,64,64,0.2); }
.t-year { font-family: 'Syne', sans-serif; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.13em; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }
.t-body h3 { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.t-body p { font-size: 0.86rem; color: var(--text2); line-height: 1.7; }

/* ===================== PROJECTS ===================== */
.work-sec { background: var(--bg2); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 22px; }
.proj-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
.proj-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.proj-prev { position: relative; height: 210px; overflow: hidden; background: #0d1117; }
.proj-badge { position: absolute; top: 11px; left: 11px; z-index: 2; background: rgba(0,0,0,0.68); color: #fff; font-size: 0.7rem; font-weight: 600; padding: 4px 11px; border-radius: 100px; backdrop-filter: blur(4px); pointer-events: none; }
.iframe-box { width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.iframe-box iframe { width: 1260px; height: 860px; border: none; transform: scale(0.258); transform-origin: top left; display: block; pointer-events: none; }
.proj-overlay { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0); transition: background 0.3s; }
.proj-overlay span { background: #fff; color: #0d1117; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.88rem; padding: 11px 26px; border-radius: 8px; opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s; }
.proj-card:hover .proj-overlay { background: rgba(0,0,0,0.42); }
.proj-card:hover .proj-overlay span { opacity: 1; transform: translateY(0); }
.proj-body { padding: 22px; }
.proj-body h3 { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.proj-body p { font-size: 0.84rem; color: var(--text2); line-height: 1.65; margin-bottom: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags span { background: rgba(232,64,64,0.09); color: var(--accent); font-size: 0.7rem; font-weight: 600; padding: 3px 9px; border-radius: 5px; }
.center-wrap { text-align: center; margin-top: 44px; }

/* ===================== TESTIMONIALS ===================== */
.testi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 22px; }
.testi-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 30px; transition: transform 0.3s, box-shadow 0.3s; }
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stars { color: #fbbf24; font-size: 0.88rem; letter-spacing: 2px; margin-bottom: 14px; }
.testi-card > p { font-size: 0.88rem; color: var(--text3); line-height: 1.75; margin-bottom: 22px; font-style: italic; }
.t-author { display: flex; align-items: center; gap: 12px; }
.av { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),#ff6b35); display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-size: 0.78rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.t-author strong { display: block; font-size: 0.88rem; color: var(--text); font-weight: 600; }
.t-author span { font-size: 0.76rem; color: var(--text2); }

/* ===================== CTA BAND ===================== */
.cta-band { background: var(--accent); padding: 60px 22px; text-align: center; }
.cta-inner h2 { font-family: 'Syne', sans-serif; font-size: clamp(1.5rem,3.5vw,2.3rem); font-weight: 800; color: #fff; line-height: 1.3; margin-bottom: 26px; }

/* ===================== CONTACT ===================== */
.contact-sec { background: var(--bg2); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.cs-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.cs-icon { width: 38px; height: 38px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--text2); flex-shrink: 0; }
.cs-icon svg { width: 17px; height: 17px; }
.cs-row strong { display: block; font-size: 0.86rem; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.cs-row span { font-size: 0.8rem; color: var(--text2); line-height: 1.5; }
.c-cards { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; }
.c-card { display: flex; align-items: center; gap: 11px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px 18px; font-size: 0.88rem; color: var(--text); transition: transform 0.2s, border-color 0.2s; }
.c-card:hover { transform: translateY(-2px); border-color: rgba(232,64,64,0.35); }
.c-card svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }
.c-socials { display: flex; gap: 14px; flex-wrap: wrap; }
.c-socials a { width: 28px; height: 28px; color: var(--text2); transition: color 0.2s, transform 0.2s; }
.c-socials a svg { width: 100%; height: 100%; }
.c-socials a:hover { color: var(--text); transform: translateY(-2px); }

.c-right { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 34px; }
.c-right h3 { font-family: 'Syne', sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.form-sub { font-size: 0.84rem; color: var(--text2); margin-bottom: 24px; }
.fg { margin-bottom: 18px; }
.fg label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text3); margin-bottom: 5px; }
.fg input, .fg textarea { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 7px; padding: 11px 14px; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.88rem; outline: none; resize: vertical; transition: border-color 0.2s; }
.fg input::placeholder, .fg textarea::placeholder { color: var(--text2); }
.fg input:focus, .fg textarea:focus { border-color: var(--accent); }
.form-ok { display: none; margin-top: 12px; padding: 11px 14px; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); border-radius: 7px; color: #22c55e; font-size: 0.86rem; font-weight: 500; text-align: center; }
.form-ok.show { display: block; }

/* ===================== FOOTER ===================== */
.footer { background: var(--bg); border-top: 1px solid var(--border); }
.footer-top { max-width: 1160px; margin: 0 auto; padding: 56px 22px 44px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; }
.f-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.1em; margin-bottom: 11px; }
.f-logo span { color: var(--accent); }
.f-brand p { font-size: 0.84rem; color: var(--text2); line-height: 1.7; margin-bottom: 10px; max-width: 320px; }
.f-contact { font-size: 0.8rem !important; color: var(--text2); margin-bottom: 18px !important; }
.f-icons { display: flex; gap: 13px; flex-wrap: wrap; }
.f-icons a { width: 26px; height: 26px; color: var(--text2); transition: color 0.2s, transform 0.2s; }
.f-icons a svg { width: 100%; height: 100%; }
.f-icons a:hover { color: var(--text); transform: translateY(-2px); }
.f-cols { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 28px; }
.f-col h4 { font-family: 'Syne', sans-serif; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.f-col a { display: block; font-size: 0.84rem; color: var(--text2); margin-bottom: 9px; transition: color 0.2s; }
.f-col a:hover { color: var(--text); }
.nl-col form { display: flex; flex-direction: column; gap: 9px; }
.nl-col input { background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 9px 13px; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.84rem; outline: none; transition: border-color 0.2s; }
.nl-col input:focus { border-color: var(--accent); }
.nl-col button { background: var(--text); color: var(--bg); border: none; border-radius: 7px; padding: 9px; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.84rem; cursor: pointer; transition: opacity 0.2s; }
.nl-col button:hover { opacity: 0.82; }
.nl-ok { display: none; font-size: 0.8rem; color: #22c55e; font-weight: 500; margin-top: 5px; }
.nl-ok.show { display: block; }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 22px; display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; max-width: 1160px; margin: 0 auto; }
.footer-bottom p { font-size: 0.78rem; color: var(--text2); text-align: center; }

/* ===================== SCROLL REVEAL ===================== */
.sr { opacity: 0; transform: translateY(26px); transition: opacity 0.65s ease, transform 0.65s ease; }
.sr.visible { opacity: 1; transform: translateY(0); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 860px) {
  .about-box { grid-template-columns: 1fr; gap: 30px; padding: 30px 22px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .f-cols { grid-template-columns: 1fr 1fr; }
  .nl-col { grid-column: 1/-1; }
}
@media (max-width: 560px) {
  .sec { padding: 68px 0; }
  .hero { padding: 84px 18px 60px; }
  .stats { gap: 22px 30px; }
  .sn { font-size: 2rem; }
  .proj-grid { grid-template-columns: 1fr; }
  .testi-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .f-cols { grid-template-columns: 1fr; }
  .nl-col { grid-column: auto; }
  .container { padding: 0 16px; }
}
