/* ============================================================
   PORTFOLIO  —  styles.css
   ------------------------------------------------------------
   The colors are set with "variables" at the top so you can
   re-theme the whole site by changing a few lines.
   Search for  --accent  to change the highlight color.
   ============================================================ */

/* ---------- Theme variables ---------- */
:root {
  --accent: #7c5cff;          /* main highlight (violet) */
  --accent-2: #22d3ee;        /* secondary highlight (cyan) */
  --accent-3: #f472b6;        /* third accent (pink) for orbs */

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1120px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
}

/* Dark theme (default) */
:root[data-theme="dark"] {
  --bg: #0a0b10;
  --bg-soft: #10121a;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #eceef4;
  --muted: #9aa1b2;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
}

/* Light theme */
:root[data-theme="light"] {
  --bg: #f7f7fb;
  --bg-soft: #ffffff;
  --surface: rgba(10, 12, 30, .03);
  --surface-2: rgba(10, 12, 30, .05);
  --border: rgba(10, 12, 30, .10);
  --border-strong: rgba(10, 12, 30, .18);
  --text: #14161f;
  --muted: #5b6172;
  --shadow: 0 20px 45px -22px rgba(30, 25, 70, .28);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

/* Accessibility: keyboard skip link */
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 200;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Animated background orbs ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  animation: float 18s ease-in-out infinite;
}
:root[data-theme="light"] .orb { opacity: .32; }
.orb-1 { width: 42vw; height: 42vw; background: var(--accent);   top: -12vw; left: -8vw; }
.orb-2 { width: 38vw; height: 38vw; background: var(--accent-2); top: 20vh;  right: -12vw; animation-delay: -6s; }
.orb-3 { width: 34vw; height: 34vw; background: var(--accent-3); bottom: -14vw; left: 30vw; animation-delay: -11s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(4vw, -3vh) scale(1.08); }
  66%      { transform: translate(-3vw, 3vh) scale(.94); }
}

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 18px -6px var(--accent);
}
.brand-text { font-family: var(--font-display); letter-spacing: -.01em; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; color: var(--muted);
  font-size: .95rem; font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-cta {
  color: #fff !important;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2)));
  box-shadow: 0 8px 22px -12px var(--accent);
}
.nav-cta:hover { color: #fff !important; transform: translateY(-1px); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle, .hamburger {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface); color: var(--text);
  cursor: pointer; transition: border-color .2s, background .2s, transform .15s;
}
.theme-toggle:hover, .hamburger:hover { border-color: var(--accent); }
.theme-toggle:active { transform: scale(.92); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"]  .icon-sun  { display: block; }
:root[data-theme="dark"]  .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun  { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

.hamburger { display: none; flex-direction: column; gap: 4px; }
.hamburger span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px;
  font-weight: 600; font-size: .96rem; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2)));
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px var(--accent); }

.btn-ghost {
  background: var(--surface); color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; }
.hero-inner { display: flex; flex-direction: column; align-items: flex-start; padding-block: 80px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: .85rem; font-weight: 500; margin: 0 0 26px;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

.hero-title { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; margin: 0 0 22px; }
.grad-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1.05rem, 2.3vw, 1.35rem); color: var(--muted); max-width: 640px; margin: 0 0 34px; }
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.hero-socials { display: flex; gap: 12px; }
.hero-socials a {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  color: var(--muted); transition: color .2s, border-color .2s, transform .2s, background .2s;
}
.hero-socials a:hover { color: var(--text); border-color: var(--accent); transform: translateY(-3px); background: var(--surface-2); }
.hero-socials svg { width: 20px; height: 20px; fill: currentColor; }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: 20px; display: grid; justify-items: center; padding-top: 8px; }
.scroll-hint span { width: 4px; height: 8px; border-radius: 2px; background: var(--muted); animation: scrolly 1.8s infinite; }
@keyframes scrolly { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(70px, 11vw, 130px); }
.section-eyebrow { font-family: var(--font-display); color: var(--accent); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; margin: 0 0 14px; }
.section-title { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; margin: 0 0 18px; }
.section-lead { color: var(--muted); max-width: 560px; font-size: 1.05rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 34px; align-items: start; }
.about-text p { color: var(--muted); font-size: 1.06rem; margin: 0 0 16px; }
.about-text p:first-of-type { margin-top: 4px; }
.about-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.about-card h3 { margin: 0 0 16px; font-size: 1.1rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.facts li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 500; }
.facts li span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); font-size: 1.05rem; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 44px; }
.service-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .25s, transform .25s var(--ease), box-shadow .3s;
}
.service-card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow); }
.service-icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 13px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: 1.45rem; margin-bottom: 16px;
}
.service-card h3 { margin: 0 0 10px; font-size: 1.12rem; }
.service-card p { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.6; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 40px; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: border-color .25s, transform .25s var(--ease); }
.skill-card:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.skill-card h3 { margin: 0 0 18px; font-size: 1.08rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 9px; }
.chips li {
  padding: 7px 14px; border-radius: 999px; font-size: .88rem; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  transition: border-color .2s, color .2s;
}
.chips li:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Projects ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 44px; }
.project-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.project-thumb { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.project-thumb span { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: rgba(255,255,255,.85); }
.thumb-a { background: linear-gradient(135deg, #7c5cff, #22d3ee); }
.thumb-b { background: linear-gradient(135deg, #f472b6, #7c5cff); }
.thumb-c { background: linear-gradient(135deg, #22d3ee, #34d399); }
.project-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.project-body h3 { margin: 0 0 10px; font-size: 1.25rem; }
.project-body > p { color: var(--muted); margin: 0 0 18px; flex: 1; }
.tags { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: .78rem; font-weight: 500; color: var(--muted); padding: 4px 10px; border: 1px solid var(--border); border-radius: 7px; }
.project-links { display: flex; gap: 18px; }
.project-links a { font-weight: 600; font-size: .92rem; color: var(--accent); transition: opacity .2s; }
.project-links a:hover { opacity: .7; }
.project-note { font-size: .8rem; color: var(--muted); margin: 12px 0 0; opacity: .85; }
/* The "Your project next?" invitation card gets a subtle dashed outline */
.project-cta { border-style: dashed; border-color: var(--border-strong); background: transparent; }

/* ---------- Contact ---------- */
.contact-card {
  text-align: center; max-width: 640px; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: clamp(36px, 6vw, 64px);
  box-shadow: var(--shadow);
}
.contact-card .section-eyebrow,
.contact-card .section-lead { margin-inline: auto; }
.contact-card .section-lead { margin-bottom: 30px; }
.contact-socials { display: flex; justify-content: center; gap: 26px; margin-top: 30px; }
.contact-socials a { color: var(--muted); font-weight: 500; transition: color .2s; }
.contact-socials a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: 34px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .92rem; }
.footer p { margin: 0; }
.footer-note { opacity: .8; }
.back-top { color: var(--muted); font-weight: 500; transition: color .2s; }
.back-top:hover { color: var(--accent); }

/* ---------- Floating contact button (always on screen) ---------- */
.contact-fab {
  position: fixed; right: clamp(16px, 4vw, 26px); bottom: clamp(16px, 4vw, 26px);
  z-index: 90;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2)));
  color: #fff; font-weight: 600; font-size: .95rem;
  box-shadow: 0 14px 34px -10px var(--accent);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease);
}
.contact-fab:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -12px var(--accent); }
.contact-fab svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* On small phones, shrink to just the icon so it doesn't crowd the screen */
@media (max-width: 520px) {
  .contact-fab span { display: none; }
  .contact-fab { padding: 14px; }
}

/* ---------- Scroll-reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }

  .hamburger { display: flex; }

  .nav-links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px clamp(20px, 5vw, 40px) 24px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-140%); transition: transform .35s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 14px; font-size: 1.05rem; }
}

/* ---------- Respect reduced-motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
