:root {
  --bg: #05070d;
  --bg-elevated: #0b0f1a;
  --panel: #10152233;
  --panel-solid: #10152a;
  --text: #e8ecf5;
  --text-soft: #93a0b8;
  --border: #212a3f;
  --accent: #33e0ff;
  --accent-2: #7c5cff;
  --accent-gradient: linear-gradient(120deg, #33e0ff 0%, #7c5cff 100%);
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.22;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1.2em;
  color: var(--text-soft);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #7fe9ff;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(5, 7, 13, 0.7);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

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

.brand img {
  width: 36px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(51, 224, 255, 0.35));
}

.brand span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

nav.main-nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  position: relative;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  padding-bottom: 4px;
}

nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.25s ease;
}

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

nav.main-nav a:hover::after,
nav.main-nav a.active::after {
  width: 100%;
}

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

/* Hero */
.hero {
  padding: 110px 0 90px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  width: 900px;
  height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(51, 224, 255, 0.18), transparent),
              radial-gradient(closest-side at 70% 60%, rgba(124, 92, 255, 0.16), transparent);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-size: 2.75rem;
  max-width: 780px;
  margin: 0 auto 0.5em;
}

.hero .lead {
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 2em;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 2.2em;
}

.badge {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 0.85rem;
  color: var(--text-soft);
  backdrop-filter: blur(6px);
}

/* Buttons */
.btn {
  display: inline-block;
  position: relative;
  background: var(--accent-gradient);
  color: #04070d;
  padding: 13px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 rgba(51, 224, 255, 0);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(51, 224, 255, 0.25);
  color: #04070d;
  text-decoration: none;
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Sections */
section {
  padding: 80px 0;
  position: relative;
}

section.alt {
  background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.04), transparent);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-head h2 {
  font-size: 2rem;
}

.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(51, 224, 255, 0.4);
  box-shadow: 0 16px 40px rgba(5, 7, 13, 0.5);
}

.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(51, 224, 255, 0.08);
  border: 1px solid rgba(51, 224, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 1.4rem;
}

.card h3 {
  font-size: 1.2rem;
}

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

/* Education / timeline */
.edu-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.edu-item:last-child {
  border-bottom: none;
}

.edu-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-gradient);
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(51, 224, 255, 0.6);
}

.edu-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.2em;
}

.edu-item .meta {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 0;
}

/* Portfolio */
.project-card {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow: 0 16px 40px rgba(5, 7, 13, 0.5);
}

.project-card .tag {
  align-self: flex-start;
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: #b5a6ff;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0;
}

.project-card a.visit {
  font-weight: 600;
  font-size: 0.92rem;
}

/* Contact */
.contact-box {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 48px;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}

.contact-box .email {
  font-size: 1.5rem;
  font-family: "Space Grotesk", sans-serif;
  display: block;
  margin-bottom: 1.4em;
}

/* Form */
.form-box {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 48px;
  max-width: 620px;
  margin: 0 auto;
}

.form-box h2 {
  margin-bottom: 0.3em;
}

.form-box form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-box label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-top: 14px;
}

.form-box input,
.form-box textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-box input:focus,
.form-box textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(51, 224, 255, 0.12);
}

.form-box button {
  margin-top: 22px;
  align-self: flex-start;
  border: none;
  cursor: pointer;
}

@media (max-width: 640px) {
  .form-box {
    padding: 32px 24px;
  }
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.88rem;
}

footer.site-footer a {
  color: var(--text-soft);
}

/* Responsive */
@media (max-width: 860px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  nav.main-nav ul {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-header .container {
    flex-direction: column;
    gap: 14px;
  }

  .hero {
    padding: 72px 0 60px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .contact-box {
    padding: 32px 24px;
  }
}
