/* Design inspired by calm, modern dev portfolios — spacious layout, soft contrast */

:root {
  color-scheme: dark;
  --bg: #09090f;
  --bg-elevated: #111118;
  --bg-card: #14141c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #60a5fa;
  --accent-2: #a78bfa;
  --accent-soft: rgba(96, 165, 250, 0.12);
  --header-bg: rgba(9, 9, 15, 0.82);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1120px;
  --section-pad: clamp(4rem, 8vw, 6rem);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #18181b;
  --text-muted: #52525b;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --header-bg: rgba(250, 250, 250, 0.88);
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(96, 165, 250, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(167, 139, 250, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(96, 165, 250, 0.06), transparent);
}

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

a {
  color: inherit;
}

ul {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  color: var(--text);
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.nav-brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-card);
}

.nav-toggle {
  display: none;
}

/* Sections */
main {
  position: relative;
  z-index: 1;
}

.section {
  padding-block: var(--section-pad);
}

.section-alt {
  background: rgba(255, 255, 255, 0.02);
  border-block: 1px solid var(--border);
}

:root[data-theme='light'] .section-alt {
  background: rgba(15, 23, 42, 0.02);
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 2.5rem;
}

/* Hero */
.hero {
  padding-top: clamp(3rem, 6vw, 5rem);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.hero-heading {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  max-width: 52ch;
  margin-bottom: 1.75rem;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn i {
  font-size: 0.9em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 32px rgba(96, 165, 250, 0.25);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--accent-soft);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  padding: 1rem 0.85rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.stat-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero-note {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.7;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

/* Profile card */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.profile-image-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(145deg, var(--accent-soft), rgba(167, 139, 250, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-initials {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  opacity: 0.85;
}

.profile-image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card-footer {
  padding: 1.25rem;
  text-align: center;
}

.profile-socials {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.profile-socials a {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.profile-socials a:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.profile-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}

.about-prose p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 62ch;
}

.about-prose p:last-child {
  margin-bottom: 0;
}

.about-highlights {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.highlight-list {
  display: grid;
  gap: 1.25rem;
}

.highlight-list li {
  display: flex;
  gap: 1rem;
}

.highlight-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.highlight-list strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.highlight-list p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Technologies */
.tech-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.tech-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.tech-group header {
  margin-bottom: 1.25rem;
}

.tech-group h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.tech-group header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-list li {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.pill-list--compact {
  margin-bottom: 1.25rem;
}

/* Projects */
.project-list {
  display: grid;
  gap: 1.25rem;
}

.project-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.project-item:hover {
  border-color: rgba(96, 165, 250, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.project-featured {
  border-color: rgba(96, 165, 250, 0.2);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(96, 165, 250, 0.04) 100%);
}

.project-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.project-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
}

.project-item > p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 72ch;
  line-height: 1.7;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}

.project-link:hover {
  text-decoration: underline;
}

.project-link i {
  font-size: 0.75rem;
}

/* Contact */
.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.contact-card .section-title {
  max-width: none;
}

.contact-desc {
  margin-bottom: 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: color 0.2s;
}

.footer-socials a:hover {
  color: var(--accent);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .hero-visual {
    order: -1;
    max-width: 280px;
    margin-inline: auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
  }

  .nav-links.is-open {
    display: flex;
  }

  .site-header {
    position: sticky;
  }

  .nav {
    position: relative;
  }

  .tech-groups {
    grid-template-columns: 1fr;
  }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .project-item:hover {
    transform: none;
  }
}
