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

:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --surface: #161616;
  --border: #222222;
  --accent: #00e5a0;
  --accent2: #0066ff;
  --text: #f0ede8;
  --muted: #a0a0a0;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
}

[data-theme="light"] {
  --bg: #f8f9fa;
  --bg2: #ffffff;
  --surface: #f1f3f5;
  --border: #dee2e6;
  --accent: #00a870; /* Slightly darker accent for light theme contrast */
  --accent2: #0056b3;
  --text: #1a1a1a;
  --muted: #6c757d;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

/* CUSTOM CURSOR */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, background 0.2s ease;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(0,229,160,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s, height 0.3s, border-color 0.3s;
  transform: translate(-50%, -50%);
}
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 52px; height: 52px;
  border-color: rgba(0,229,160,0.8);
}

/* NOISE OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 9997;
}

[data-theme="light"] body::before {
  opacity: 0.015;
}

/* GRID BACKGROUND */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .grid-bg {
  background-image:
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
}

/* LAYOUT */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  backdrop-filter: blur(20px);
  background: rgba(10,10,10,0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* THEME TOGGLE */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  margin-left: 20px;
  border-radius: 4px;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
[data-theme="light"] .theme-toggle .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }
/* If data-theme is not set, it defaults to dark */
html:not([data-theme="light"]) .theme-toggle .moon-icon { display: none; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px; height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.35s forwards;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .accent { color: var(--accent); }
.hero-title .outline {
  -webkit-text-stroke: 1.5px var(--text);
  color: transparent;
}

.hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 48px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.5s forwards;
}
.hero-sub strong { color: var(--text); font-weight: 500; }

.hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.65s forwards;
}
.btn-primary {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 14px 28px;
  background: var(--accent);
  color: #000;
  border: none;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,229,160,0.25);
}
.btn-ghost {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 14px 28px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 400;
  transition: border-color 0.2s, color 0.2s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* MARQUEE */
.marquee-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: var(--bg2);
}
.marquee-track {
  display: flex;
  gap: 0;
  animation: marquee 28s linear infinite;
  white-space: nowrap;
}
.marquee-item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.marquee-item::after {
  content: '✦';
  color: var(--accent);
  font-size: 0.6rem;
}

/* ABOUT */
section { padding: 120px 0; position: relative; z-index: 1; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.about-title .accent { color: var(--accent); }
.about-body {
  color: #aaa;
  font-size: 0.95rem;
  line-height: 1.85;
  font-weight: 300;
}
.about-body p + p { margin-top: 16px; }
.about-body strong { color: var(--text); font-weight: 500; }

.about-right { display: flex; flex-direction: column; gap: 16px; }

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px 24px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--accent);
  transition: height 0.3s ease;
}
.skill-card:hover { border-color: #333; transform: translateX(4px); }
.skill-card:hover::before { height: 100%; }
.skill-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 3px 8px;
}

/* EXPERTISE */
.expertise-section { background: var(--bg2); }
.expertise-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
}
.expertise-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.expertise-card {
  background: var(--bg);
  padding: 40px 32px;
  border: 1px solid var(--border);
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
  group: true;
}
.expertise-card:hover { background: var(--surface); }
.expertise-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}
.expertise-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.expertise-desc {
  font-size: 0.875rem;
  color: #888;
  line-height: 1.75;
  font-weight: 300;
}
.expertise-card-accent {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.expertise-card:hover .expertise-card-accent { transform: scaleX(1); }

/* WORK */
.work-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 64px;
  line-height: 1.05;
}
.work-list { display: flex; flex-direction: column; }
.work-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 48px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s ease;
}
.work-item:hover { padding-left: 12px; }
.work-item:first-child { border-top: 1px solid var(--border); }
.work-period {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 4px;
}
.work-company {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.work-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.work-desc {
  font-size: 0.875rem;
  color: #888;
  line-height: 1.75;
  font-weight: 300;
  max-width: 560px;
}
.work-metric {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
  white-space: nowrap;
}
.work-metric-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 4px;
}

/* CONTACT */
.contact-section {
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 24px;
}
.contact-title .outline {
  -webkit-text-stroke: 1.5px var(--text);
  color: transparent;
}
.contact-sub {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  background: var(--surface);
}
.contact-link:hover {
  border-color: var(--accent);
  background: rgba(0,229,160,0.04);
  transform: translateX(6px);
}
.contact-link-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.contact-link-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}
.contact-arrow { color: var(--accent); font-size: 1.1rem; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .expertise-grid { grid-template-columns: 1fr; }
  .work-item { grid-template-columns: 1fr; gap: 12px; }
  .work-metric { display: none; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .container { padding: 0 20px; }
  section { padding: 80px 0; }
}