:root {
  --bg: #0B0E13;
  --bg-elevated: #12151C;
  --border: #1F2430;
  --text: #E7E9EE;
  --text-muted: #8890A0;
  --accent: #7C5CFF;
  --accent-mint: #33D9A6;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --max-width: 1080px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

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

:focus-visible {
  outline: 2px solid var(--accent-mint);
  outline-offset: 3px;
}

/* subtle grain/texture overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.035) 1px, transparent 0);
  background-size: 22px 22px;
}

main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: rgba(11, 14, 19, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.logo .dot { color: var(--accent-mint); }

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-mint);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 100px;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 0 0 rgba(51, 217, 166, 0.6);
  animation: pulse 2s infinite;
}
.pulse.small { width: 6px; height: 6px; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(51, 217, 166, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(51, 217, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(51, 217, 166, 0); }
}

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

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 96px 0 72px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  font-weight: 600;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  display: inline-block;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent-mint);
  color: var(--accent-mint);
}

/* HERO WINDOW / TERMINAL */
.hero-window {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}

.window-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.window-chrome span.dot-red, .window-chrome span.dot-yellow, .window-chrome span.dot-green {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }
.window-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.window-body {
  margin: 0;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text);
  min-height: 220px;
  white-space: pre-wrap;
}

.caret {
  color: var(--accent-mint);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
}

/* TECH STRIP */
.tech-strip {
  padding: 32px 0 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.strip-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 18px;
}
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: scroll 28s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  white-space: nowrap;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* SECTIONS */
.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--border);
}
.contact-section { border-bottom: none; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}
.section-index {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
}
.section h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  margin: 0;
}
.section-sub {
  color: var(--text-muted);
  margin: 0 0 40px;
}

/* EXPERIENCE */
.exp-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-top: 32px;
}
.exp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.exp-top h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 4px;
}
.exp-company {
  color: var(--accent-mint);
  margin: 0;
  font-size: 0.95rem;
}
.exp-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.exp-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
}
.exp-list li {
  margin-bottom: 10px;
}
.exp-list li::marker { color: var(--accent); }

/* PROJECTS */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .project-grid { grid-template-columns: 1fr; }
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.project-card:hover {
  border-color: var(--accent-mint);
  box-shadow: 0 0 0 1px rgba(51,217,166,0.15), 0 12px 30px -14px rgba(51,217,166,0.25);
  transform: translateY(-3px);
}
.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 12px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 100px;
}
.project-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 18px;
}
.project-links {
  display: flex;
  gap: 16px;
}
.project-links a {
  font-size: 0.85rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.project-links a:hover {
  color: var(--accent-mint);
  border-color: var(--accent-mint);
}

/* ABOUT */
.about-text {
  max-width: 68ch;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 24px;
}

/* CONTACT */
.contact-sub {
  color: var(--text-muted);
  margin: 24px 0 28px;
}
.contact-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* STATUS BAR (signature element) */
.statusbar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  background: var(--accent);
  color: #0B0E13;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.statusbar-left, .statusbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.statusbar .pulse.small { background: #0B0E13; }
.statusbar .sep { opacity: 0.5; }

@media (max-width: 560px) {
  .statusbar-right span:not(#clock) { display: none; }
  .statusbar-right .sep { display: none; }
}
