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

:root {
  --bg: #080808;
  --bg-2: #0f0f0f;
  --bg-3: #141414;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text-1: #f0f0f0;
  --text-2: #888;
  --text-3: #444;
  --accent: #e8e0d0;
  --green: #4ade80;
  --copper: #b87333;
  --copper-light: #d4956a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 56px;
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-1);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 12.5px;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* ── HERO ── */
.hero {
  padding: 130px 56px 110px;
  max-width: 1200px;
  position: relative;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text { flex: 1; }

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 260px;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
  border: 1px solid var(--border);
  filter: grayscale(0.2);
  transition: filter 0.3s;
}

.hero-photo img:hover { filter: grayscale(0); }

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-name {
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 200;
  letter-spacing: -0.03em;
  color: var(--text-1);
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-headline {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 200;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin-bottom: 10px;
}

.hero-headline .muted { color: var(--text-3); }

.hero-sub {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 500px;
  margin-bottom: 52px;
  font-weight: 300;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #0a0a0a;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 11px 24px;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 11px 24px;
  border-radius: 4px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

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

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); }

/* ── BIO ── */
.bio {
  padding: 72px 56px;
  max-width: 780px;
}

.section-label {
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 40px;
  height: 1px;
  background: var(--border);
}

.bio-text {
  font-size: 18px;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.8;
  letter-spacing: -0.005em;
}

.bio-text strong {
  color: var(--text-1);
  font-weight: 400;
}

/* ── SKILLS ── */
.skills {
  padding: 0 56px 72px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.skill-tag {
  font-size: 11px;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  font-family: 'DM Mono', monospace;
}

/* ── SEEKING ── */
.seeking {
  padding: 22px 56px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.seeking-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.seeking-badge {
  font-size: 10px;
  background: rgba(74, 222, 128, 0.1);
  color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.2);
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.seeking-text {
  font-size: 13px;
  color: var(--text-2);
}

.seeking-text strong { color: var(--text-1); font-weight: 400; }

.btn-ghost {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}

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

/* ── CONTACT ── */
.contact {
  padding: 72px 56px;
  max-width: 780px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s;
}

.contact-item:hover { border-color: var(--border-hover); }

/* ── SOCIAL BUTTONS ── */
.social-buttons {
  display: flex;
  gap: 12px;
  padding: 0 56px 72px;
  margin-top: -48px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s;
}

.social-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
}

.social-btn svg {
  flex-shrink: 0;
}

.contact-label {
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-width: 70px;
  font-family: 'DM Mono', monospace;
}

.contact-value {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s;
}

.contact-item:hover .contact-value { color: var(--text-1); }

/* ── FOOTER ── */
footer {
  padding: 28px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  font-size: 11.5px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 11.5px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.04em;
}

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

/* ── FADE-IN ANIMATION ── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeIn 0.7s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.15s; }
.fade-in:nth-child(3) { animation-delay: 0.25s; }
.fade-in:nth-child(4) { animation-delay: 0.35s; }

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HEADER (shared for inner pages) ── */
.page-header {
  padding: 100px 56px 64px;
  max-width: 1100px;
}

.page-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 200;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin-bottom: 12px;
}

.page-subtitle {
  font-size: 15px;
  color: var(--text-2);
  font-weight: 300;
}

/* ── PROJECT CARDS ── */
.projects-grid {
  padding: 0 56px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 36px 28px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s;
}

.project-card:hover { border-color: var(--border-hover); }

.project-card-body {
  flex: 1;
}

.project-card-title {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-1);
  margin-bottom: 10px;
}

.project-card-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  font-weight: 300;
}

.project-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.project-tag {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.04em;
}

.project-card-links {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.project-link {
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 3px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s;
}

.project-link:hover { border-color: var(--border-hover); color: var(--text-2); }

/* ── RESEARCH LIST ── */
.research-list {
  padding: 0 56px 80px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.research-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: opacity 0.2s;
}

.research-item:first-child { border-top: 1px solid var(--border); }
.research-item:hover { opacity: 0.8; }

.research-info { flex: 1; }

.research-title {
  font-size: 17px;
  font-weight: 400;
  color: var(--text-1);
  margin-bottom: 10px;
}

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

.research-tag {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.04em;
}

.research-date {
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  color: var(--text-3);
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding-top: 3px;
}

/* ── ARTICLE ── */
.article {
  max-width: 720px;
  padding: 0 56px;
  margin: 0 auto;
}

.article-header {
  padding: 100px 0 40px;
}

.article-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 200;
  letter-spacing: -0.02em;
  color: var(--text-1);
  line-height: 1.2;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.article-date {
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

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

.article-summary {
  font-size: 16px;
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.7;
  font-style: italic;
}

.article-body {
  padding: 40px 0 64px;
}

.article-body h2 {
  font-size: 22px;
  font-weight: 400;
  color: var(--text-1);
  margin: 40px 0 16px;
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: 17px;
  font-weight: 400;
  color: var(--text-1);
  margin: 32px 0 12px;
}

.article-body p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 16px;
}

.article-body strong { color: var(--text-1); font-weight: 400; }
.article-body em { font-style: italic; }

.article-body pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px 24px;
  margin: 24px 0;
  overflow-x: auto;
}

.article-body code {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--text-2);
}

.article-body p code {
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.article-body blockquote {
  border-left: 2px solid var(--copper-light);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
}

.article-body blockquote p {
  color: var(--text-2);
  font-style: italic;
  margin-bottom: 0;
}

.article-body ul, .article-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.article-body li {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 4px;
}

.article-body img {
  max-width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
  margin: 24px 0;
}

.article-caption {
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
  margin-top: -16px;
  margin-bottom: 24px;
}

.article-table-wrap {
  margin: 24px 0;
  overflow-x: auto;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: 'DM Mono', monospace;
}

.article-body th {
  text-align: left;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10.5px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.article-body td {
  color: var(--text-2);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.article-body tr:last-child td { border-bottom: none; }

.article-nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 56px 64px;
}

/* ── CV ── */
.cv-content {
  padding: 0 56px 80px;
  max-width: 780px;
}

.cv-section {
  margin-bottom: 48px;
}

.cv-section:last-child { margin-bottom: 0; }

.cv-entry {
  margin-bottom: 20px;
}

.cv-entry:last-child { margin-bottom: 0; }

.cv-role {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-1);
  margin-bottom: 4px;
}

.cv-org {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 4px;
}

.cv-date {
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.cv-details {
  list-style: none;
}

.cv-details li {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  padding-left: 14px;
  position: relative;
  font-weight: 300;
}

.cv-details li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--text-3);
}

.cv-inline-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.cv-inline-tag {
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 24px; }
  .nav-links { gap: 20px; }
  .hero { padding: 80px 24px 64px; }
  .hero-content { flex-direction: column-reverse; gap: 40px; align-items: flex-start; }
  .hero-photo img { width: 140px; height: 140px; }
  .bio { padding: 48px 24px; }
  .skills { padding: 0 24px 48px; }
  .seeking { padding: 18px 24px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .contact { padding: 48px 24px; }
  .social-buttons { padding: 0 24px 48px; }
  footer { padding: 24px; flex-direction: column; gap: 16px; align-items: flex-start; }
  .page-header { padding: 64px 24px 40px; }
  .projects-grid { padding: 0 24px 48px; grid-template-columns: 1fr; }
  .research-list { padding: 0 24px 48px; }
  .research-item { flex-direction: column; gap: 10px; }
  .article { padding: 0 24px; }
  .article-header { padding: 64px 0 32px; }
  .article-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
  .article-nav { padding: 0 24px 48px; }
  .cv-content { padding: 0 24px 48px; }
}
