:root {
  --bg: #08111f;
  --bg-soft: #0e1a2f;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #f7fafc;
  --muted: #b7c4d8;
  --muted-2: #8ea0bb;
  --primary: #7dd3fc;
  --primary-strong: #38bdf8;
  --accent: #c084fc;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.22), transparent 32%),
    radial-gradient(circle at 80% 8%, rgba(192, 132, 252, 0.18), transparent 34%),
    linear-gradient(180deg, #08111f 0%, #0a1322 42%, #08111f 100%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

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

.section-padding {
  padding: 96px 0;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.glass-card,
.project-card,
.contact-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 17, 31, 0.72);
  backdrop-filter: blur(20px);
}

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.1rem;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #06101c;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.28);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-menu a {
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 10px 18px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 999px;
  color: var(--text) !important;
  background: rgba(125, 211, 252, 0.08);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 72px;
  align-items: center;
}

.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 14px;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 760px;
  font-size: clamp(3rem, 8vw, 6.5rem);
}

.hero-title {
  margin-top: 20px;
  color: var(--primary);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
}

.hero-description {
  max-width: 680px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #06101c;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.22);
}

.btn-secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}

.btn-secondary:hover {
  border-color: rgba(125, 211, 252, 0.42);
  background: var(--surface-strong);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 46px;
}

.hero-meta div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
}

.hero-meta strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1;
}

.hero-meta span {
  display: block;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 0.87rem;
}

.hero-card {
  position: relative;
  min-height: 480px;
  display: grid;
  place-items: center;
}

.profile-orbit {
  position: absolute;
  width: min(90vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.18);
  animation: spin 18s linear infinite;
}

.profile-orbit span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 28px rgba(125, 211, 252, 0.9);
}

.profile-orbit span:nth-child(1) {
  top: 18%;
  left: 3%;
}

.profile-orbit span:nth-child(2) {
  right: 8%;
  top: 28%;
  background: var(--accent);
}

.profile-orbit span:nth-child(3) {
  bottom: 8%;
  left: 42%;
}

.profile-card {
  position: relative;
  width: min(100%, 360px);
  padding: 36px;
  border-radius: var(--radius-xl);
  text-align: center;
}

.profile-avatar {
  width: 118px;
  height: 118px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.94), rgba(192, 132, 252, 0.9)),
    #ffffff;
  color: #06101c;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  box-shadow: 0 18px 55px rgba(56, 189, 248, 0.28);
}

.profile-card h2 {
  font-size: 1.6rem;
}

.profile-card p {
  margin-top: 10px;
  color: var(--muted);
}

.profile-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.profile-stack span,
.project-type,
.project-year {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 700;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.two-column {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
}

.section-heading h2 {
  max-width: 760px;
  font-size: clamp(2.1rem, 4vw, 3.7rem);
}

.section-heading.center {
  text-align: center;
}

.section-heading.center h2 {
  margin-inline: auto;
}

.about-content {
  color: var(--muted);
  font-size: 1.02rem;
}

.about-content p + p {
  margin-top: 18px;
}

.muted-section {
  background: rgba(255, 255, 255, 0.025);
  border-block: 1px solid rgba(255, 255, 255, 0.07);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
}

.skill-card {
  min-height: 280px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

.icon-box {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #06101c;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.skill-card h3 {
  margin-top: 24px;
  font-size: 1.2rem;
}

.skill-card p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.project-card {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(125, 211, 252, 0.13), transparent 38%);
  pointer-events: none;
}

.project-card.featured {
  grid-column: span 2;
  background:
    linear-gradient(145deg, rgba(125, 211, 252, 0.14), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.07);
}

.project-topline {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.project-card h3,
.project-card p,
.project-card ul {
  position: relative;
}

.project-card h3 {
  margin-top: 26px;
  font-size: 1.42rem;
}

.project-card p {
  margin-top: 14px;
  color: var(--muted);
}

.project-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  color: var(--muted);
}

.project-list li {
  position: relative;
  padding-left: 22px;
}

.project-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.timeline {
  position: relative;
  max-width: 840px;
  margin: 52px auto 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 24px;
  align-items: stretch;
}

.timeline-item + .timeline-item {
  margin-top: 20px;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.4);
  background: rgba(125, 211, 252, 0.1);
}

.timeline-dot::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 22px rgba(125, 211, 252, 0.7);
}

.timeline-content {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.timeline-content span {
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 800;
}

.timeline-content h3 {
  margin-top: 8px;
  font-size: 1.22rem;
}

.timeline-content p {
  margin-top: 8px;
  color: var(--muted);
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  padding: 46px;
  border-radius: var(--radius-xl);
}

.contact-card h2 {
  max-width: 720px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.contact-card p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 16px;
  color: var(--muted);
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.94rem;
}

.footer-inner a {
  color: var(--primary);
  font-weight: 800;
}

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

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

@media (max-width: 980px) {
  .hero-grid,
  .two-column,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 44px;
  }

  .hero {
    min-height: auto;
  }

  .hero-card {
    min-height: 420px;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .section-padding {
    padding: 72px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 76px;
    left: 14px;
    right: 14px;
    display: grid;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(8, 17, 31, 0.94);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-menu a {
    display: block;
    padding: 14px 12px;
  }

  .nav-cta {
    margin-top: 8px;
    text-align: center;
  }

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

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: span 1;
  }

  .contact-card {
    padding: 28px;
  }

  .profile-card {
    padding: 28px;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 2.72rem;
  }

  .profile-orbit {
    width: 300px;
  }

  .hero-card {
    min-height: 360px;
  }

  .timeline-item {
    gap: 16px;
  }
}

/* Updated portfolio media cards */
.project-media {
  position: relative;
  margin: -8px -8px 22px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  aspect-ratio: 16 / 9;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.project-card:hover .project-media img {
  transform: scale(1.035);
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.project-card p {
  flex-grow: 1;
}

.project-card.featured {
  min-height: 520px;
}

.project-card.featured .project-media {
  aspect-ratio: 21 / 9;
}

.profile-stack span:nth-child(n + 7) {
  color: var(--text);
}

@media (max-width: 980px) {
  .project-card.featured {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .project-card.featured {
    grid-column: span 1;
    min-height: auto;
  }

  .project-card.featured .project-media {
    aspect-ratio: 16 / 10;
  }
}
