@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #080b10;
  --bg-2: #0d1117;
  --card: #111720;
  --card-hover: #151d27;
  --border: #202a36;
  --border-light: #334150;
  --text: #f4f7fa;
  --muted: #8995a5;
  --accent: #55e6c1;
  --accent-dark: #07120f;
  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

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

button {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-dark);
}

/* NAVBAR */
.navbar {
  width: min(var(--max-width), calc(100% - 40px));
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
}

.logo {
  font-family: "DM Mono", monospace;
  font-size: 1.1rem;
  font-weight: 500;
}

.logo span {
  color: var(--accent);
}

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

.nav-links a {
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

/* HERO */
.hero {
  width: min(var(--max-width), calc(100% - 40px));
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 70px;
  align-items: center;
}

.hero-content {
  padding: 80px 0;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
}

.hero h1 {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -5px;
}

.hero h1 span {
  color: var(--accent);
}

.hero h2 {
  margin-top: 28px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -1.5px;
}

.hero-description {
  max-width: 600px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 1rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 35px;
}

.btn {
  min-height: 46px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--accent-dark);
}

.btn-primary:hover {
  background: #73edcf;
}

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

.btn-secondary:hover {
  border-color: var(--accent);
}

/* TERMINAL */
.terminal {
  width: 100%;
  background: #06090d;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.terminal-top {
  height: 42px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--border);
  background: #0a0e13;
}

.terminal-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #37414d;
}

.terminal-body {
  padding: 26px;
  font-family: "DM Mono", monospace;
  font-size: 0.76rem;
}

.terminal-body p {
  margin-bottom: 11px;
}

.terminal-green {
  color: var(--accent);
}

.terminal-output {
  margin-left: 17px;
  color: #aeb8c5;
}

.cursor-line {
  display: flex;
  align-items: center;
}

.cursor {
  width: 7px;
  height: 15px;
  margin-left: 5px;
  display: inline-block;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* SECTIONS */
.section {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 120px 0;
}

.section-alt {
  width: 100%;
  padding-left: max(20px, calc((100% - var(--max-width)) / 2));
  padding-right: max(20px, calc((100% - var(--max-width)) / 2));
  background: var(--bg-2);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 55px;
}

.section-number {
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -2px;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 90px;
}

.about-main {
  max-width: 720px;
}

.about-main p {
  margin-bottom: 20px;
  color: var(--muted);
}

.about-main .large-text {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.55;
}

.about-main strong {
  color: var(--accent);
}

.about-facts {
  border-top: 1px solid var(--border);
}

.fact {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}

.fact span {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fact strong {
  margin-top: 4px;
  font-size: 0.95rem;
}

/* SKILLS */
.skills-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.skill-card,
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.skill-card {
  padding: 30px;
}

.skill-card:hover,
.project-card:hover {
  transform: translateY(-5px);
  background: var(--card-hover);
  border-color: var(--border-light);
}

.skill-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(85, 230, 193, 0.09);
  color: var(--accent);
  font-family: "DM Mono", monospace;
}

.skill-card h3 {
  font-size: 1.15rem;
}

.skill-card p {
  margin: 12px 0 25px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* TAGS */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tags span {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: #aeb8c5;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
}

/* PROJECTS */
.project-card {
  min-height: 300px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 60px;
}

.project-type {
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.63rem;
  letter-spacing: 1px;
}

.project-arrow {
  color: var(--muted);
}

.project-card h3 {
  font-size: 1.3rem;
}

.project-card p {
  flex: 1;
  margin: 10px 0 25px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* RESEARCH */
.research-box {
  padding: 45px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 50px;
  align-items: end;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.research-box h3 {
  max-width: 700px;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -1.5px;
}

.research-box p:not(.eyebrow) {
  max-width: 650px;
  margin-top: 20px;
  color: var(--muted);
}

/* ARTICLE */
.article-card {
  padding: 35px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.article-label {
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.63rem;
  letter-spacing: 1px;
}

.article-card h3 {
  max-width: 750px;
  margin-top: 8px;
  font-size: 1.45rem;
  line-height: 1.35;
}

.article-card p:not(.article-label) {
  max-width: 700px;
  margin-top: 10px;
  color: var(--muted);
}

/* LINKS */
.text-link {
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.76rem;
  white-space: nowrap;
}

.text-link:hover {
  opacity: 0.7;
}

/* CONTACT */
.contact-section {
  padding-top: 150px;
  padding-bottom: 150px;
  text-align: center;
}

.contact-section h2 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1;
  letter-spacing: -4px;
}

.contact-section > p:not(.eyebrow) {
  max-width: 560px;
  margin: 22px auto 35px;
  color: var(--muted);
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-links a {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  width: min(var(--max-width), calc(100% - 40px));
  min-height: 90px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

/* ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* TABLET */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 100px;
  }

  .hero-content {
    padding-top: 70px;
    padding-bottom: 20px;
  }

  .hero-card {
    max-width: 650px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

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

  .research-box,
  .article-card {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* MOBILE */
@media (max-width: 700px) {
  .navbar {
    width: calc(100% - 30px);
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    width: 220px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
    border-radius: 6px;
  }

  .nav-links a:hover {
    background: var(--bg-2);
  }
}

/* SMALL MOBILE */
@media (max-width: 550px) {
  .hero,
  .section {
    width: calc(100% - 30px);
  }

  .section-alt {
    padding-left: 15px;
    padding-right: 15px;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 18vw, 5rem);
    letter-spacing: -3px;
  }

  .hero h2 {
    font-size: 1.6rem;
  }

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

  .btn {
    width: 100%;
  }

  .section {
    padding: 85px 0;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .research-box,
  .article-card,
  .skill-card,
  .project-card {
    padding: 24px;
  }

  .project-top {
    margin-bottom: 45px;
  }

  .terminal-body {
    padding: 20px;
    font-size: 0.68rem;
  }

  .contact-section {
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .contact-section h2 {
    letter-spacing: -3px;
  }

  .footer-inner {
    width: calc(100% - 30px);
    min-height: auto;
    padding: 25px 0;
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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