/* ===================================================
   ACADEMIC PERSONAL SITE — DARK THEME
   Aesthetic: Modern dark, teal accent
   Typography: Inter (sans-serif) + JetBrains Mono (monospace)
   =================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&display=swap');

:root {
  --bg-base: #0f0f0f;
  --bg-surface: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #d0d0d0;
  --accent: #00d084;

  /* swapped to retro fonts */
  --ff-display: 'Press Start 2P', monospace; /* headings */
  --ff-sans: 'Share Tech Mono', monospace;    /* body */

  --transition: 0.15s ease;
}

/* Light theme */
html.light-theme {
  --bg-base: #ffffff;        /* page background */
  --bg-surface: #fafafa;     /* card / surface */
  --text-primary: #000000;   /* main text */
  --text-secondary: #333333; /* secondary text */
  --accent: #00a366;         /* green accent - change if desired */

  /* fonts (optional to change per theme) */
  --ff-display: 'Press Start 2P', monospace;
  --ff-sans: 'Share Tech Mono', monospace;

  --transition: 0.15s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--ff-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  display: block;
}

/* --- Navigation --- */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--accent);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  gap: 0;
}

.nav-name {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

.nav-links a {
  font-family: var(--ff-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* --- Cord Pull Theme Switch --- */
.cord-pull {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.cord-container {
  position: relative;
  width: 3px;
  height: 40px;
}

.cord {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(to bottom, #666, #999);
  height: 100%;
  transform-origin: top center;
  transition: none;
}

.pull-knob {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 30% 30%, #ffcc00, #cc9900);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.light-bulb {
  font-size: 24px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.cord-pull.active .light-bulb {
  filter: grayscale(0%);
  animation: bulbFlash 0.2s ease;
}

@keyframes bulbFlash {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

html.light-theme .light-bulb {
  filter: grayscale(0%) brightness(1.2);
}

/* --- Sidebar --- */
.sidebar {
  display: none;
}

/* --- Main Content --- */
.main-content {
  padding: 40px 60px;
  background: var(--bg-base);
  max-width: 1200px;
  margin: 0 auto;
}

.container {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* --- Hero / Profile Section --- */
.hero {
  padding: 0;
  margin-bottom: 40px;
  border-bottom: none;
}

.hero-inner {
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.hero-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  font-family: var(--ff-sans);
}

.hero-name {
  font-family: var(--ff-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.hero-position {
  font-family: var(--ff-sans);
  font-style: normal;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.hero-bio {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 600px;
}

.hero-bio p {
  margin: 0;
}

.hero-bio p + p {
  margin-top: 1rem;
}

.chips {
  display: none;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 20px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 14px;
  border: 2px solid var(--accent);
  border-radius: 0;
  transition: all var(--transition);
  background: transparent;
  font-weight: 600;
}

.hero-link:hover {
  border-color: var(--accent);
  color: var(--bg-base);
  background: var(--accent);
}

.hero-photo {
  width: 80px;
  height: 80px;
  border-radius: 0;
  object-fit: cover;
  border: 3px solid var(--accent);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.hero-photo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 0;
  background: var(--bg-surface);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

/* --- Section Styles --- */
.section {
  padding: 0;
  border-top: none;
  margin-bottom: 50px;
}

.section-header {
  max-width: none;
  margin: 0 0 20px 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title {
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--accent);
}

.section-body {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* --- News --- */
.news-list {
  list-style: none;
  margin-bottom: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-surface);
  font-size: 14px;
  line-height: 1.7;
  align-items: baseline;
}

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

.news-date {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 600;
  padding-top: 0.1rem;
  font-family: var(--ff-sans);
}

.news-text {
  color: var(--text-secondary);
}

.news-text a {
  color: var(--accent);
  text-decoration: underline;
  border-bottom: none;
  transition: opacity var(--transition);
}

.news-text a:hover {
  opacity: 0.8;
}

/* --- Research --- */
.research-intro {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.8;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-card {
  padding: 20px 24px;
  background: var(--bg-surface);
  border: none;
  border-left: 4px solid var(--accent);
  border-radius: 0;
}

.project-title {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

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

.project-desc a {
  color: var(--accent);
  text-decoration: underline;
}

.project-desc a:hover {
  opacity: 0.8;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  font-size: 11px;
  font-family: var(--ff-sans);
  padding: 3px 8px;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.project-year {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--ff-sans);
  margin: 0.5rem 0 0.75rem 0;
  font-weight: 500;
}

.project-publisher {
  font-size: 0.85rem;
  color: var(--accent);
  font-family: var(--ff-sans);
  margin: 0.25rem 0 0.75rem 0;
  font-weight: 500;
}

/* --- Teaching --- */
.teaching-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.teaching-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-surface);
  align-items: baseline;
}

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

.teaching-course {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.teaching-role {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: normal;
}

.teaching-year {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  font-family: var(--ff-sans);
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-family: var(--ff-sans);
  font-weight: 600;
}

.contact-value {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.contact-value a {
  color: var(--accent);
  text-decoration: underline;
  border-bottom: none;
  transition: opacity var(--transition);
}

.contact-value a:hover {
  opacity: 0.8;
}

/* --- Footer --- */
.site-footer {
  padding: 20px 60px;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--bg-surface);
  letter-spacing: 0.05em;
}

/* --- Utility --- */
a {
  color: inherit;
}

strong {
  font-weight: 500;
}

em {
  font-style: italic;
}

hr.divider {
  border: none;
  border-top: 1px solid var(--bg-surface);
  margin: 2rem 0;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .main-content {
    padding: 30px 40px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .news-date {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding: 20px;
  }

  .site-footer {
    padding: 15px 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--bg-surface);
    padding: 1rem;
    gap: 0.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .hero-name {
    font-size: 32px;
  }

  .section-title {
    font-size: 22px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Fade-in animation on load --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.section {
  animation: fadeUp 0.6s ease both;
}
