:root {
  --primary: #09111f;
  --secondary: #101a2b;
  --tertiary: #142238;
  --accent: #4f8cff;
  --accent-strong: #2f6fe9;
  --accent-soft: rgba(79, 140, 255, 0.14);
  --text-primary: #f4f7fb;
  --text-secondary: #9ba9bf;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 22px 46px rgba(0, 0, 0, 0.32);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(79, 140, 255, 0.14), transparent 26%),
    radial-gradient(circle at 85% 12%, rgba(44, 209, 184, 0.08), transparent 22%),
    linear-gradient(180deg, #09111f 0%, #0b1422 46%, #0e1728 100%);
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

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

.section {
  padding: 6rem 0;
}

.section-alt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.01)),
    var(--secondary);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(11, 20, 34, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
}

.brand {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.desktop-nav a,
.mobile-nav a {
  color: var(--text-secondary);
  font-size: 0.96rem;
  font-weight: 500;
  transition: color 180ms ease, transform 180ms ease;
}

.resume-link {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.resume-link svg,
.button-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible,
.mobile-nav a:hover,
.mobile-nav a:focus-visible,
.desktop-nav a.active,
.mobile-nav a.active {
  color: var(--accent);
  transform: scale(1.08);
}

.menu-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 1.4rem;
  height: 2px;
  margin: 0.26rem auto;
  background: var(--text-primary);
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  padding: 0 1rem 1rem;
  background: var(--secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.9rem;
}

.mobile-nav a {
  padding: 0.2rem 0;
  text-align: center;
}

.hero {
  min-height: 100vh;
  padding-top: 7.5rem;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.45rem, 5vw, 4rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
  margin-left: -0.38em;
}

.hero-role {
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 600;
}

.hero-text,
.section-copy,
.timeline-content li,
.project-card p,
.skill-card p,
.achievement-card p,
.footer-content p,
.hero-links a,
.footer-links a {
  color: var(--text-secondary);
  line-height: 1.8;
}

.hero-text {
  max-width: 48rem;
  font-size: 1.03rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-3px) scale(1.06);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #69a1ff);
  color: #fff;
  box-shadow: 0 12px 30px rgba(79, 140, 255, 0.24);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-strong);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.button-icon {
  gap: 0.45rem;
}

.hero-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  margin-top: 2rem;
}

.hero-links a:hover,
.hero-links a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent);
}

.hero-visual {
  display: grid;
  gap: 1.5rem;
}

.hero-panel {
  padding: 2rem 1.75rem 2.15rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.profile-orb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 20.5rem;
  margin-bottom: 1.35rem;
}

.profile-ring {
  position: absolute;
  width: min(22rem, 80vw);
  height: min(22rem, 80vw);
  border-radius: 50%;
  border: 2px solid rgba(79, 140, 255, 0.35);
  box-shadow:
    0 0 0 12px rgba(79, 140, 255, 0.05),
    0 0 80px rgba(79, 140, 255, 0.12);
  animation: pulseRing 3.2s ease-in-out infinite;
}

.profile-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 14rem;
  height: 14rem;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4f8cff, #122440 72%);
  box-shadow: var(--shadow);
}

.profile-core img {
  width: 102%;
  height: 102%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transform: translateY(1%);
}

.project-card,
.skill-card,
.achievement-card,
.summary-card,
.hero-panel,
.timeline-content,
.timeline-meta {
  backdrop-filter: blur(8px);
}

.project-card,
.skill-card,
.achievement-card {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)), var(--secondary);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.hero-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.summary-card {
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.summary-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
}

.summary-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.section-heading {
  margin-bottom: 3rem;
  text-align: center;
}

.section-heading h2,
.footer-content h2 {
  color: var(--text-primary);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
}

.section-heading span {
  display: block;
  width: 5rem;
  height: 4px;
  margin: 0.9rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #69a1ff);
}

.section-copy-centered {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
}


.timeline-shared {
  position: relative;
  max-width: 70rem;
  margin: 0 auto;
}

.timeline-shared::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(79, 140, 255, 0.35);
  transform: translateX(-50%);
}

.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 2rem;
}

.timeline-row::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1.4rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(79, 140, 255, 0.14);
  transform: translateX(-50%);
}

.timeline-row-left .timeline-card {
  grid-column: 1;
  margin-right: 2.5rem;
}

.timeline-row-right .timeline-card {
  grid-column: 2;
  margin-left: 2.5rem;
}

.timeline-card {
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}

.timeline-type,
.timeline-date {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-type {
  margin-bottom: 0.35rem;
}

.timeline-date {
  margin-bottom: 0.7rem;
}

.timeline-card h3 {
  margin-bottom: 0.45rem;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.timeline-card h4 {
  margin-bottom: 0.75rem;
  color: #cfe0ff;
  font-size: 1.02rem;
  font-weight: 600;
}

.timeline-card p,
.timeline-card li {
  color: var(--text-secondary);
  line-height: 1.75;
}

.experience-short {
  margin-bottom: 0.9rem;
}

.timeline-card ul {
  margin: 0;
  padding-left: 1rem;
}

.timeline-card li + li {
  margin-top: 0.75rem;
}

.project-grid,
.skills-grid,
.achievements-grid {
  display: grid;
  gap: 1.5rem;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.project-card,
.skill-card,
.achievement-card {
  overflow: hidden;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.project-card:hover,
.skill-card:hover,
.achievement-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 20px rgba(255, 255, 255, 0.1),
    0 0 34px rgba(79, 140, 255, 0.22);
}

.project-media {
  position: relative;
  height: 12.5rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 17, 31, 0.06), rgba(9, 17, 31, 0.34));
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 280ms ease;
}

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

.project-card-inner,
.skill-card,
.achievement-card {
  padding: 1.6rem;
}

.project-card-inner {
  min-height: 100%;
}

.project-tag {
  margin-bottom: 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.project-card h3,
.skill-card h3,
.achievement-card h3 {
  margin-bottom: 0.8rem;
  color: var(--text-primary);
  font-size: 1.42rem;
  font-weight: 700;
}

.project-short {
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.project-tech span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.72rem;
  border: 1px solid rgba(79, 140, 255, 0.2);
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.08);
  color: #cfe0ff;
  font-size: 0.78rem;
  font-weight: 600;
}

.project-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.project-icon-btn svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.project-icon-btn:hover,
.project-icon-btn:focus-visible {
  color: var(--accent);
  border-color: rgba(79, 140, 255, 0.24);
  transform: scale(1.12);
}

.read-more-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.1rem;
}

.read-more-btn:hover,
.read-more-btn:focus-visible {
  color: #8ab5ff;
  transform: scale(1.04);
}

.project-details {
  margin-top: 0.75rem;
  padding-top: 0;
  border-top: 0;
  animation: fadeInExpand 220ms ease;
}

.project-details p {
  margin-bottom: 0.75rem;
}

.project-details ul {
  margin: 0.2rem 0 0;
  padding-left: 1rem;
}

.project-details li + li {
  margin-top: 0.6rem;
}

.project-card ul {
  margin: 1rem 0 0;
  padding-left: 1rem;
  color: var(--text-secondary);
}

.project-card li + li {
  margin-top: 0.7rem;
}

.site-footer {
  padding: 6rem 0;
}

.footer-content {
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
}

.footer-button {
  margin-top: 2rem;
}

.footer-links {
  justify-content: center;
  margin-top: 2rem;
}

.footer-note {
  margin-top: 1.5rem;
  color: #7b7b7b;
  font-size: 0.92rem;
}

.scroll-top-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(11, 20, 34, 0.88);
  color: var(--text-primary);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.96);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-top-btn:hover,
.scroll-top-btn:focus-visible {
  color: var(--accent);
  border-color: rgba(79, 140, 255, 0.28);
  transform: translateY(-2px) scale(1.06);
}

.scroll-top-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  transition:
    opacity 820ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 820ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

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

@keyframes pulseRing {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes fadeInExpand {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .project-grid,
  .skills-grid,
  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .timeline-shared::before {
    left: 0.45rem;
    transform: none;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    margin-left: 1.8rem;
  }

  .timeline-row::before {
    left: -1.35rem;
    transform: none;
  }

  .timeline-row-left .timeline-card,
  .timeline-row-right .timeline-card {
    grid-column: 1;
    margin-left: 0;
    margin-right: 0;
  }

  .hero {
    padding-top: 8rem;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-actions,
  .hero-links {
    justify-content: center;
  }

  .hero-panel {
    max-width: 36rem;
    margin: 0 auto;
  }

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

  .scroll-top-btn {
    right: 1rem;
    bottom: 1rem;
  }

  .timeline-meta {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .section {
    padding: 4.5rem 0;
  }

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

  .button {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

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