/* ============================================
   GLOBAL STYLES — Premium Dark Theme
   ============================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Fira+Code:wght@400;500&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  /* Palette */
  --bg-primary:   #0f1115;
  --bg-secondary: #161920;
  --bg-card:      #1a1e27;
  --bg-elevated:  #222733;
  --bg-hover:     #282e3b;

  --accent:       #00b4d8;          /* electric cyan-blue */
  --accent-hover: #0096c7;
  --accent-glow:  rgba(0, 180, 216, .15);
  --accent-soft:  rgba(0, 180, 216, .08);

  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-heading:   #f1f5f9;

  --border:       #2a2f3c;
  --border-light: #333a4a;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'Fira Code', monospace;

  /* Layout */
  --max-w:        1200px;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --transition:   .25s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Section Spacing ---------- */
section {
  padding-block: 40px;
}

/* ---------- Main Content Wrapper ---------- */
.main-content {
  padding-bottom: 110px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 17, 21, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-heading);
  letter-spacing: -.02em;
}
.nav__logo span { color: var(--accent); }
.nav__links { display: flex; gap: 32px; align-items: center; }
.nav__links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 2px;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav__links a:hover { color: var(--text-primary); }
.nav__links a:hover::after { width: 100%; }
.nav__links a.active { color: var(--accent); }
.nav__links a.active::after { width: 100%; }

/* Mobile burger */
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav__burger span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 32px rgba(0,180,216,.3);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn--sm {
  padding: 10px 20px;
  font-size: .85rem;
}
.btn--icon svg { width: 18px; height: 18px; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero__text { position: relative; z-index: 1; }
.hero__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  letter-spacing: .04em;
}
.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text-heading);
  letter-spacing: -.03em;
  margin-bottom: 20px;
}
.hero__title span { color: var(--accent); }
.hero__sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 48px;
  line-height: 1.75;
}
.hero__ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero__avatar {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-light);
  box-shadow: 0 0 60px rgba(0,180,216,.12), 0 20px 60px rgba(0,0,0,.4);
  position: relative;
  z-index: 1;
}
.hero__visual::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   PRODUCT SPOTLIGHT
   ============================================ */
.spotlight {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.spotlight__card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  transition: border-color var(--transition);
}
.spotlight__card:hover { border-color: var(--accent); }
.spotlight__logo {
  width: 160px;
  height: 160px;
  border-radius: var(--radius);
  object-fit: contain;
}
.spotlight__info {}
.spotlight__label {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--accent);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.spotlight__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
}
.spotlight__desc {
  color: var(--text-secondary);
  font-size: .95rem;
  max-width: 520px;
}

/* ============================================
   ABOUT ME
   ============================================ */
.about .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: start;
}
.section-label {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -.02em;
  margin-bottom: 24px;
}
.about__text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: .95rem;
}
.about__highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}
.highlight-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
}
.highlight-card__icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.highlight-card__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-heading);
  margin-bottom: 6px;
}
.highlight-card__desc {
  font-size: .85rem;
  color: var(--text-muted);
}

/* ============================================
   ARTICLES
   ============================================ */
.articles { background: var(--bg-secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
}
.article-card__tag {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.article-card__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text-heading);
  margin-bottom: 10px;
  line-height: 1.35;
}
.article-card__excerpt {
  font-size: .88rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 16px;
}
.article-card__link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .85rem;
}
.article-card__link:hover svg { transform: translateX(4px); }
.article-card__link svg { transition: transform var(--transition); vertical-align: middle; margin-left: 4px; }

/* ============================================
   CASE STUDIES HOOK
   ============================================ */
.cs-hook {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-secondary) 100%);
  text-align: center;
  border-top: 1px solid var(--border);
}
.cs-hook__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
}
.cs-hook__desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 32px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  z-index: 100;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}
.footer__copy {
  font-size: .85rem;
  color: var(--text-muted);
}
.footer__links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.footer__icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-secondary);
  background: transparent;
  transition: background var(--transition), color var(--transition);
  font-size: 1.3rem;
}
.footer__icon-link:hover {
  color: var(--accent);
  background: var(--bg-hover);
}
.footer__icon-link svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* ============================================
   RESUME PAGE
   ============================================ */
/* Top bar */
.resume-header {
  padding-top: 80px;
  padding-bottom: 40px;
}
.resume-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.resume-header__back {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.resume-header__back:hover { color: var(--accent); }

/* Tech stack matrix */
.tech-stack {
  padding-bottom: 80px;
}
.tech-stack__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
  align-items: stretch;
}
.tech-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.tech-category__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-heading);
  margin-bottom: 16px;
}
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tech-tag {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,180,216,.15);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tech-tag:hover {
  background: rgba(0,180,216,.18);
  transform: translateY(-1px);
}

.tech-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex-shrink: 0;
}

.tech-category--learning {
  display: inline-block;
  max-width: max-content;
  margin-top: 2rem;
  background: transparent !important;
  border: 2px dashed var(--border);
  opacity: 0.7;
  padding: 1.5rem;
  border-radius: var(--radius);
}

.tech-tags--learning {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tech-tag-learning {
  border-style: dashed;
}

/* Experience timeline */
.timeline {
  padding-bottom: 40px;
}
.timeline__items {
  position: relative;
  margin-top: 32px;
  padding-left: 32px;
}
.timeline__items::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 2px;
  height: 100%;
  background: var(--border);
}
.timeline__item {
  position: relative;
  padding-bottom: 48px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: -37px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline__date {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--accent);
  margin-bottom: 6px;
}
.timeline__role {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text-heading);
  margin-bottom: 4px;
}
.timeline__company {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.timeline__bullets { padding-left: 18px; }
.timeline__bullets li {
  list-style: disc;
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 6px;
}

/* Technical proof CTA */
.proof-cta {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ============================================
   CASE STUDIES PAGE
   ============================================ */
.cs-page-header {
  padding-top: 100px;
  padding-bottom: 40px;
  text-align: center;
}
.cs-page-header__sub {
  color: var(--text-secondary);
  max-width: 600px;
  margin-inline: auto;
  font-size: .95rem;
}

.case-study {
  padding-bottom: 80px;
}
.case-study__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}
.case-study__card:hover { border-color: var(--accent); }
.case-study__header {
  padding: 40px 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.case-study__number {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--accent);
  letter-spacing: .06em;
}
.case-study__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-heading);
}
.case-study__tags { display: flex; gap: 8px; }
.case-study__body {
  padding: 32px 40px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.cs-block {}
.cs-block__label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-heading);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-block__label::before {
  content: '';
  width: 4px; height: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.cs-block__text {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.7;
}
.cs-code-placeholder {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-muted);
  white-space: pre-wrap;
}

.cs-bottom-nav {
  padding-bottom: 100px;
}
.cs-bottom-nav .container {
  display: flex;
  gap: 16px;
  justify-content: center;
}

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

/* Tablet: Backend spans full width, 2-column layout */
@media (max-width: 1024px) {
  .tech-stack__grid {
    grid-template-columns: 1fr 1fr;
  }
  .tech-category:first-child {
    grid-column: 1 / -1;
  }
}

/* Mobile: Single column */
@media (max-width: 768px) {
  .tech-stack__grid {
    grid-template-columns: 1fr;
  }
  .tech-category:first-child {
    grid-column: auto;
  }
}

@media (max-width: 968px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero__sub { margin-inline: auto; }
  .hero__ctas { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__avatar { width: 260px; height: 260px; }
  .hero__visual::before { width: 300px; height: 300px; }
  .about .container { grid-template-columns: 1fr; }
  .spotlight__card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .articles__grid { grid-template-columns: 1fr; }
  .case-study__body { grid-template-columns: 1fr; }
  .case-study__header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 1024px) {
  .main-content {
    padding-bottom: 120px;
  }
}
@media (max-width: 640px) {
  .main-content {
    padding-bottom: 80px;
  }
  section { padding-block: 60px; }
  .container { padding-inline: 16px; }
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }
  .nav__burger { display: flex; }
  .hero__title { font-size: 2rem; }
  .about__highlights { grid-template-columns: 1fr; }
  .footer .container { flex-direction: column; gap: 16px; text-align: center; }
  .spotlight__card { padding: 28px 20px; }
  .case-study__body { padding: 24px 20px 28px; }
  .case-study__header { padding: 28px 20px 0; }
  .resume-header .container { flex-direction: column; align-items: flex-start; }
}
