:root {
  --bg: #0b1020;
  --bg-soft: #0f1a30;
  --card: rgba(255, 255, 255, 0.05);
  --glass: rgba(255, 255, 255, 0.08);
  --text: #e9edf5;
  --muted: #9eb2c7;
  --accent: #7df3d4;
  --accent-2: #ffb347;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font-display: "Space Grotesk", "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, rgba(125, 243, 212, 0.12), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(255, 179, 71, 0.18), transparent 25%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.6;
  overflow-x: hidden;
}

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

main {
  flex: 1 0 auto;
  position: relative;
  z-index: 1;
}

.background-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.accent-sphere {
  position: fixed;
  width: 240px;
  height: 240px;
  filter: blur(60px);
  opacity: 0.45;
  z-index: 0;
}

.sphere-one {
  top: 12%;
  right: 8%;
  background: radial-gradient(circle, rgba(125, 243, 212, 0.5), transparent 60%);
}

.sphere-two {
  bottom: 8%;
  left: 12%;
  background: radial-gradient(circle, rgba(255, 179, 71, 0.5), transparent 60%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 40px);
  background: linear-gradient(90deg, rgba(15, 26, 48, 0.9), rgba(11, 16, 32, 0.9));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1020;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.6px;
}

.brand-role {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.nav a {
  color: var(--muted);
  padding: 10px 8px;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav a.active,
.nav a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.hero,
.section {
  padding: clamp(32px, 4vw, 48px) clamp(18px, 4vw, 40px);
  margin: 0 auto;
  max-width: 1180px;
  scroll-margin-top: 90px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
  padding-top: 36px;
}

.hero-text h1 {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.15;
  margin: 10px 0 14px;
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.button.solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1020;
  border-color: transparent;
  box-shadow: var(--shadow);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.06);
}

.button.text {
  padding: 12px 8px;
  border: none;
}

.button.full {
  width: 100%;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.tag,
.chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.badge {
  color: var(--text);
  background: rgba(125, 243, 212, 0.1);
  border-color: rgba(125, 243, 212, 0.4);
}

.badge.large {
  padding: 10px 14px;
  font-size: 1rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hero-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 10px;
}

.meta-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.meta-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta-value {
  margin: 0;
  font-weight: 700;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-card {
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

.panel-card.glass {
  backdrop-filter: blur(10px);
}

.panel-card.highlight {
  background: linear-gradient(160deg, rgba(125, 243, 212, 0.12), rgba(255, 179, 71, 0.08));
}

.panel-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.panel-text {
  margin: 8px 0 10px;
  color: var(--muted);
}

.section-header {
  max-width: 840px;
}

.section h2 {
  margin: 8px 0;
  font-size: clamp(28px, 3vw, 36px);
}

.section-lede {
  color: var(--muted);
  margin: 0 0 18px;
}

.kicker {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0;
}

.about-grid,
.card-grid,
.contact-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.about-card,
.skill-card,
.project-card,
.contact-card,
.link-card {
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.link-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.card-title {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 1.05rem;
}

.card-body {
  margin: 0;
  color: var(--muted);
}

.card-grid {
  margin-top: 12px;
}

.project-card .project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-card .badge {
  border-color: rgba(255, 255, 255, 0.18);
}

.project-card:hover,
.skill-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 16px 18px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  cursor: pointer;
}

.accordion-trigger .caret {
  transition: transform 0.25s ease;
  color: var(--accent);
  font-size: 1.1rem;
}

.accordion-trigger.open .caret {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease, border-color 0.2s ease;
  border-top: 1px solid transparent;
  padding: 0 18px;
}

.accordion-content.open {
  padding: 8px 18px 18px;
  border-top-color: var(--border);
}

.module-block {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 6px);
  padding: 12px;
}

.module-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.module-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.module-subtitle {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--accent);
}

.module-list {
  margin: 0 0 8px;
  color: var(--muted);
}

.module-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-style: italic;
}

.timeline {
  position: relative;
  margin-top: 12px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-item {
  position: relative;
  padding-left: 12px;
}

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06);
}

.timeline-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.98rem;
}

.time-range {
  color: var(--accent);
}

.timeline h3 {
  margin: 6px 0;
}

ul {
  padding-left: 18px;
  margin: 8px 0;
  color: var(--muted);
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.contact-section {
  background: linear-gradient(180deg, rgba(15, 26, 48, 0.9), rgba(11, 16, 32, 0.95));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.contact-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.contact-list a:hover {
  color: var(--accent);
}

.pdf-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pdf-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  min-height: 70vh;
}

.pdf-frame iframe {
  width: 100%;
  height: 70vh;
  border: none;
  background: #0b1020;
}

.pdf-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(125, 243, 212, 0.08), rgba(255, 179, 71, 0.06));
  color: var(--text);
}

.pdf-fallback p {
  margin: 6px 0;
}

.pdf-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer {
  padding: 24px clamp(18px, 4vw, 40px) 40px;
  text-align: center;
  color: var(--muted);
  background: #090d1a;
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.footer a {
  color: var(--text);
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

@media (max-width: 1024px) {
  .nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    padding: 14px clamp(18px, 4vw, 40px);
    background: rgba(11, 16, 32, 0.95);
    flex-direction: column;
    border-bottom: 1px solid var(--border);
  }

  .nav.open {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

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

@media (max-width: 720px) {
  .hero,
  .section {
    padding: clamp(24px, 5vw, 32px) clamp(16px, 5vw, 22px);
  }

  .hero-text h1 {
    font-size: 30px;
  }

  .panel-card ul {
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
