@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500&family=Roboto+Mono&display=swap');

:root {
  --accent: #5ac8fa;
  --separator: rgba(0,0,0,0.08);
  --hover-tint: rgba(0,0,0,0.03);
  --max-width: 1100px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Roboto Mono', monospace;
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
  padding-top: 90px;
  background: #faf7f5;
  color: #111;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 0.8rem 1rem;
  z-index: 1000;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.brand h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin: 0;
  letter-spacing: 0.5px;
  color: var(--accent);
  font-weight: 500;
}

.logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

#mode-buttons {
  display: flex;
  gap: 0.45rem;
}
#mode-buttons button {
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 0.85rem;
  line-height: 1;
}
#mode-buttons button:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.header-nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.3rem 0.5rem;
  font-family: 'Playfair Display', serif;
  transition: all 0.2s ease;
  position: relative;
}
.header-nav a:hover {
  color: var(--accent);
}
.header-nav a.active {
  font-weight: 600;
}
.header-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: currentColor;
  border-radius: 1px;
}

.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  background: transparent;
}
.hero::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
  margin: 0 0 2rem 0;
}
.hero::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
  margin: 2rem 0 0 0;
}
.hero h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  margin: 0 0 0.8rem 0;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.hero p {
  color: #555;
  margin: 0 auto;
  max-width: 760px;
  font-size: 1.1rem;
  line-height: 1.6;
}

#projects::after,
#about::after,
#contact::after,
.hero::before,
.hero::after { }
#projects {
  padding: 4rem 1rem;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}
#projects h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin: 0 0 1.4rem 0;
  text-align: left;
}

.projects-intro {
  font-family: 'Roboto Mono', monospace;
  line-height: 1.6;
  color: #555;
  margin: 0 0 2.5rem 0;
  font-size: 0.95rem;
  max-width: 600px;
}
#projects::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--separator), transparent);
  margin: 3rem 0 0 0;
}
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1.4rem;
}
.project-item {
  background: transparent;
  padding: 1.5rem 0;
  text-align: left;
  font-family: 'Roboto Mono', monospace;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  position: relative;
}
.project-item:last-child {
  border-bottom: none;
}
.project-item:hover {
  background: var(--hover-tint);
  border-radius: 4px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}
.project-item h3 { 
  margin: 0 0 0.8rem 0; 
  font-size: 1.2rem; 
  font-weight: 600;
  color: #222;
  font-family: 'Playfair Display', serif;
}
.project-item p { 
  margin: 0 0 1rem 0; 
  color: #444; 
  line-height: 1.6;
  font-size: 0.95rem;
}
.project-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
}

.project-separator {
  color: var(--accent);
  font-size: 1.2rem;
  margin: 0 0.5rem;
}

/* Theme-specific dot colors */
body.clean-light .project-separator { color: #333; }
body.clean-dark .project-separator { color: #b8b8b8; }
body.spooky .project-separator { color: #f2f2f2; }
.project-links a { 
  text-decoration: none; 
  font-weight: 500; 
  color: var(--accent);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-block;
  position: relative;
}
.project-links a:hover { 
  border-bottom-color: var(--accent);
  color: #333;
  text-decoration: none;
}

/* Theme-specific hover colors */
body.clean-dark .project-links a:hover { color: #e8e8e8; }
body.spooky .project-links a:hover { color: #a855f7; }

/* Contact links hover colors */
body.clean-dark #contact a:hover { color: #e8e8e8; }
body.spooky #contact a:hover { color: #a855f7; }
.project-links a::before {
  content: '→';
  margin-right: 0.3rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.project-links a:hover::before {
  opacity: 1;
}

#about, #contact {
  padding: 4rem 1rem;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}
#about h2, #contact h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin: 0 0 1.4rem 0;
  text-align: left;
}
#about::after, #contact::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--separator), transparent);
  margin: 3rem 0 0 0;
}
#contact::after {
  margin: 2rem 0 0 0;
}
#about p {
  font-family: 'Roboto Mono', monospace;
  line-height: 1.6;
  color: #444;
  margin: 0;
}
#contact ul { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
  font-family: 'Roboto Mono', monospace;
}
#contact li { 
  margin: 0.6rem 0; 
  font-family: 'Roboto Mono', monospace;
}
#contact li a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}
#contact li a:hover {
  border-bottom-color: var(--accent);
  color: #333;
}
#contact p {
  font-family: 'Roboto Mono', monospace;
  color: #555;
  margin-bottom: 1rem;
}

footer {
  text-align: center;
  padding: 1.2rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  color: #555;
  font-size: 0.9rem;
}

/* Light theme */
body.clean-light {
  --accent: #a774a7;
  --separator: rgba(0,0,0,0.08);
  --hover-tint: rgba(0,0,0,0.03);
  background: #f8f5f2;
  color: #222;
}
body.clean-light .card { background: #fff; border: 1px solid #eee; }

body.clean-light .hero::before,
body.clean-light .hero::after {
  background: linear-gradient(90deg, transparent, rgba(111, 78, 55, 0.16), transparent);
}
body.clean-light .hero h2 { color: #3d2a1f; }
body.clean-light .hero p { color: #6b4e3d; }
body.clean-light #projects h2,
body.clean-light #about h2,
body.clean-light #contact h2 { color: #5d4037; }

/* Dark theme */
body.clean-dark {
  --accent: #b8b8b8;
  --separator: rgba(255,255,255,0.12);
  --hover-tint: rgba(255,255,255,0.03);
  background: #0e0e10;
  color: #d7d7d7;
}
body.clean-dark header { background: rgba(14,14,16,0.85); border-bottom-color: rgba(255,255,255,0.06); }
body.clean-dark .card { background: #151516; border: 1px solid rgba(255,255,255,0.06); }
body.clean-dark nav a { color: #d6d6d6; }
body.clean-dark .project-item h3 { color: #e8e8e8; }

/* Spooky theme */
body.spooky {
  --accent: #4E1764;
  background: #0D0012;
  color: #f2f2f2;
}
body.spooky header { background: rgba(10,10,12,0.75); border-bottom-color: rgba(255,255,255,0.04); }
body.spooky .card { background: #111114; border: 1px solid rgba(255,255,255,0.04); }
body.spooky .project-item h3 { color: #f0f0f0; }
body.spooky .hero h2 { font-family: 'Cinzel', serif; font-weight: 600; }
body.spooky #projects h2,
body.spooky #about h2,
body.spooky #contact h2 { font-family: 'Cinzel', serif; font-weight: 600; color: #d0d0d0; }
body.spooky .project-item h3 { font-family: 'Cinzel', serif; font-weight: 600; }

header h1, .brand h1, .card a, #mode-buttons button { color: var(--accent); border-color: var(--accent); }

/* Responsive design */
@media (max-width: 900px) {
  body { padding-top: 80px; }
  .logo { width: 32px; height: 32px; }
  .brand h1 { font-size: 1.3rem; }
  #mode-buttons button { padding: 0.22rem 0.5rem; font-size: 0.82rem; }
  .hero { padding: 3rem 1rem 2rem; }
  .hero h2 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .header-nav { gap: 1.5rem; }
  .header-nav a { font-size: 0.8rem; }
}

@media (max-width: 640px) {
  header { padding: 0.6rem 0.6rem; }
  body { padding-top: 70px; }

  .top-row { padding: 0 0.6rem; }
  .brand h1 { font-size: 1.2rem; }
  .logo { width: 28px; height: 28px; }

  .header-nav { 
    gap: 1rem; 
  }
  .header-nav a { 
    font-size: 0.75rem; 
    padding: 0.2rem 0.3rem;
  }

  #mode-buttons {
    gap: 0.25rem;
  }

  .projects-list {
    gap: 0;
  }
  .project-item {
    padding: 1.2rem 0;
  }
}

img { max-width: 100%; display: block; }

.section-separator {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.separator-icon {
  width: 32px;
  height: 32px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  display: block;
}

.separator-icon:hover {
  opacity: 1;
}

a:focus, button:focus { outline: 2px dashed rgba(90,200,250,0.35); outline-offset: 2px; }
