/* =========================================
   Clean Slate — Personal Site
   Accent: Muted Indigo #4a4e69
   ========================================= */

:root {
  --accent: #8a86b0;
  --accent-light: #9a8c98;
  --bg: #22223b;
  --bg-alt: #2a2a45;
  --text: #e8e8ed;
  --text-secondary: #9a9aaf;
  --divider: rgba(138, 134, 176, 0.15);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 720px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(34, 34, 59, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-logo:hover {
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
}

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

.lang-toggle {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  margin-left: var(--space-xs);
}

.lang-toggle:hover {
  background: var(--accent);
  color: #fff;
}

/* ---- Hero ---- */
.hero {
  padding: calc(56px + var(--space-xl)) 0 var(--space-xl);
}

.hero-layout {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.hero-photo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--divider);
  flex-shrink: 0;
}

.hero-name {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.hero-title {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-location svg {
  opacity: 0.6;
}

.hero-divider {
  width: 1px;
  height: 14px;
  background: var(--divider);
}

/* ---- Sections ---- */
.section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.section-divider {
  width: 32px;
  height: 1px;
  background: var(--accent);
  margin: var(--space-sm) 0 var(--space-lg);
  opacity: 0.5;
}

/* ---- About ---- */
.about-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.about-content p:last-child {
  margin-bottom: var(--space-md);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-sm);
}

.skill-tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(138, 134, 176, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  letter-spacing: 0.01em;
  transition: background 0.25s ease;
}

.skill-tag:hover {
  background: rgba(138, 134, 176, 0.22);
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--divider);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-lg);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  transition: background 0.25s ease;
}

.timeline-item:hover .timeline-marker {
  background: var(--accent);
}

.timeline-date {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  letter-spacing: 0.01em;
}

.timeline-content h3 {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.timeline-org {
  font-size: 0.88rem;
  color: var(--accent-light);
  font-weight: 400;
}

/* ---- Education ---- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.edu-card {
  padding: var(--space-md);
  border: 1px solid var(--divider);
  border-radius: 8px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.edu-card:hover {
  border-color: rgba(74, 78, 105, 0.3);
  box-shadow: 0 2px 20px rgba(74, 78, 105, 0.06);
}

.edu-year {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.edu-card h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin: 0.35rem 0 0.2rem;
}

.edu-school {
  font-size: 0.88rem;
  color: var(--accent-light);
}

/* ---- Posts ---- */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.post-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
  transition: padding-left 0.3s ease;
}

.post-item:first-child {
  border-top: 1px solid var(--divider);
}

.post-item:hover {
  padding-left: 0.5rem;
}

.post-date {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  min-width: 3rem;
}

.post-item h3 {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  transition: color 0.25s ease;
}

.post-item:hover h3 {
  color: var(--accent);
}

.post-arrow {
  flex-shrink: 0;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.post-item:hover .post-arrow {
  opacity: 1;
}

.posts-view-all {
  display: block;
  text-align: center;
  margin-top: var(--space-md);
  padding: var(--space-sm) 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease;
}

.posts-view-all:hover {
  color: var(--text);
}

/* ---- Contact ---- */
.contact-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.25s ease;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-link svg {
  color: var(--accent);
  opacity: 0.7;
  transition: opacity 0.25s ease;
}

.contact-link:hover svg {
  opacity: 1;
}

/* ---- Cappadocia Canvas ---- */
.cappadocia-footer {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  pointer-events: none;
}

.cappadocia-footer canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- Footer ---- */
.footer {
  padding: var(--space-lg) 0 var(--space-md);
  text-align: center;
}

.footer p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ---- Fade-in Animation ---- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  :root {
    --space-xl: 3.5rem;
    --space-lg: 2.5rem;
  }

  .nav-links a {
    display: none;
  }

  .nav-links a:last-of-type {
    display: none;
  }

  .lang-toggle {
    margin-left: 0;
  }

  .hero-name {
    font-size: 1.75rem;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .hero-divider {
    display: none;
  }

  .hero-layout {
    flex-direction: column;
    text-align: center;
  }

  .hero-photo {
    width: 100px;
    height: 100px;
  }

  .hero-meta {
    justify-content: center;
  }

  .edu-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .cappadocia-footer { height: 200px; }
}

/* ---- Selection ---- */
::selection {
  background: rgba(138, 134, 176, 0.25);
  color: var(--text);
}

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
