:root {
  --bg-main: #0a1117;
  --bg-surface: #101a23;
  --bg-soft: #15222c;
  --text-main: #e7eef4;
  --text-muted: #93a7b5;
  --line: #243441;
  --accent: #58d2b8;
  --accent-strong: #2bb493;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(900px 550px at 95% -10%, rgba(88, 210, 184, 0.09), transparent 60%),
    radial-gradient(700px 420px at 5% 0%, rgba(43, 180, 147, 0.08), transparent 55%),
    var(--bg-main);
  line-height: 1.6;
  text-align: left;
}

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

.container {
  width: min(1150px, 92vw);
  margin-inline: auto;
}

.section {
  padding: 96px 0;
}

main section {
  scroll-margin-top: 92px;
}

.section-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.section-title {
  position: sticky;
  top: 102px;
  font-size: large;
}

.section-title h2 {
  margin-bottom: 0;
}

.section-content {
  display: grid;
  gap: 16px;
}

h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  margin: 0;
}

h2 {
  font-size: clamp(1.55rem, 2vw, 2rem);
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}

p {
  margin: 0;
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 26, 35, 0.95), rgba(16, 26, 35, 0.76));
  box-shadow: var(--shadow);
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(10, 17, 23, 0);
  transition: background 0.28s ease, border-color 0.28s ease, backdrop-filter 0.28s ease;
}

.top-nav.scrolled {
  background: rgba(10, 17, 23, 0.9);
  border-color: rgba(88, 210, 184, 0.2);
  backdrop-filter: blur(10px);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
  transition: color 0.22s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: none;
  background: rgba(16, 26, 35, 0.72);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--text-main);
  border-radius: 2px;
}

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

.hero-shell .section-title h2 {
  color: var(--text-muted);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 1rem;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: 12px;
}

.hero-role {
  font-size: clamp(1rem, 2.3vw, 1.4rem);
  color: var(--text-muted);
}

.hero-social {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

.hero-social a,
.contact-social a {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text-main);
  background: rgba(16, 26, 35, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-social a:hover,
.contact-social a:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: #0a1117;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-secondary {
  border-color: var(--line);
  color: var(--text-main);
  background: rgba(16, 26, 35, 0.72);
}

.section-copy {
  max-width: 850px;
  color: var(--text-muted);
}

.profile-tags {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 10px;
}

.profile-tags a {
  font-size: 0.82rem;
  color: #cde7f2;
  border: 1px solid rgba(205, 231, 242, 0.24);
  background: rgba(205, 231, 242, 0.08);
  border-radius: 999px;
  padding: 6px 12px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.profile-tags a:hover {
  color: var(--accent);
  border-color: rgba(88, 210, 184, 0.45);
}

.skill-card,
.achievement-card,
.contact-card,
.contact-form,
.project-card {
  padding: 22px;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project-head h3 {
  font-size: 1.2rem;
}

.ghost-btn {
  font-size: 0.86rem;
  color: var(--accent);
  border: 1px solid rgba(88, 210, 184, 0.35);
  padding: 6px 11px;
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ghost-btn:hover {
  border-color: var(--accent);
  background: rgba(88, 210, 184, 0.12);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  font-size: 0.8rem;
  color: #bed4df;
  border: 1px solid rgba(190, 212, 223, 0.2);
  background: rgba(190, 212, 223, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
}

.project-card p {
  color: var(--text-muted);
}

.project-media {
  min-height: 150px;
  border-radius: 12px;
  border: 1px solid rgba(88, 210, 184, 0.3);
  background:
    linear-gradient(145deg, rgba(88, 210, 184, 0.14), rgba(16, 26, 35, 0.65)),
    repeating-linear-gradient(
      -45deg,
      rgba(88, 210, 184, 0.15) 0,
      rgba(88, 210, 184, 0.15) 10px,
      rgba(16, 26, 35, 0.3) 10px,
      rgba(16, 26, 35, 0.3) 20px
    );
  display: grid;
  place-items: center;
  color: #d8f7ef;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.skill-card h3 {
  margin-bottom: 8px;
}

.skill-card p {
  color: var(--text-muted);
}

.timeline {
  position: relative;
  margin-left: 10px;
  padding-left: 28px;
  display: grid;
  gap: 16px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(88, 210, 184, 0.8), rgba(88, 210, 184, 0.15));
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #0a1117;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(88, 210, 184, 0.2);
}

.timeline-card {
  padding: 18px;
}

.timeline-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.timeline-row h3,
.timeline-row p:first-child {
  font-size: 1rem;
}

.timeline-row p {
  color: var(--text-muted);
  font-size: 0.93rem;
}

.timeline-card > p {
  margin-top: 9px;
  color: var(--text-muted);
}

.timeline-org {
  color: #b8cad4;
}

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

.timeline-points {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  display: grid;
  gap: 6px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.achievement-card h3 {
  margin-bottom: 8px;
}

.achievement-card p {
  color: var(--text-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 16px;
}

.contact-card h3,
.contact-form h3 {
  margin-bottom: 14px;
}

.contact-card p {
  margin-bottom: 8px;
  color: var(--text-muted);
}

.contact-card p span {
  color: var(--text-main);
  margin-right: 8px;
}

.contact-card a {
  color: #c7dbe6;
}

.contact-card h4 {
  margin: 16px 0 10px;
  color: var(--text-main);
}

.contact-social {
  display: flex;
  gap: 10px;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form label {
  color: #c7dbe6;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--text-main);
  background: rgba(13, 22, 30, 0.85);
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(88, 210, 184, 0.5);
  border-color: var(--accent);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.86rem;
  color: var(--text-muted);
  min-height: 18px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

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

@media (max-width: 960px) {
  .section-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section-title {
    position: static;
  }

  .profile-tags {
    grid-template-columns: repeat(2, max-content);
  }

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

  .timeline-row {
    flex-direction: column;
    gap: 2px;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 4vw;
    right: 4vw;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(10, 17, 23, 0.95);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    padding: 0 14px;
    transition: max-height 0.28s ease, padding 0.28s ease;
  }

  .nav-links.open {
    max-height: 370px;
    padding: 12px 14px;
  }

  .nav-links a {
    width: 100%;
    padding: 10px 0;
  }

  .section {
    padding: 84px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 30px;
  }

  .profile-tags {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
