/* ============================================
   İpek Barış — Lab-Notebook Personal Page
   ============================================ */

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

:root {
  --blue: #3b82f6;
  --blue-light: #dbeafe;
  --blue-bg: rgba(59,130,246,0.04);
  --green: #10b981;
  --green-light: #d1fae5;
  --green-bg: rgba(16,185,129,0.04);
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  --purple-bg: rgba(139,92,246,0.04);
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono {
  font-family: 'IBM Plex Mono', 'Menlo', 'Consolas', monospace;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

strong {
  font-weight: 600;
}

/* --- Grid-paper background SVG --- */
.bg-molecules {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

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

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

.nav-logo {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.blink {
  animation: blink 1.2s step-end infinite;
}

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

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

.nav-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 120px 24px 60px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-content {
  flex: 1;
}

.hero-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 18px;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.tag {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

.hero-photo-wrapper {
  position: relative;
  flex-shrink: 0;
}

.hero-photo {
  width: 240px;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--card-bg);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-node-cluster {
  position: absolute;
  bottom: -20px;
  right: -30px;
  opacity: 0.7;
}

/* --- Sections --- */
main {
  position: relative;
  z-index: 1;
}

.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px;
}

.section-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

/* --- Cards --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.75;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Card accent variants */
.card--accent-blue {
  border-top: 3px solid var(--blue);
}

.card--accent-green {
  border-top: 3px solid var(--green);
}

.card--accent-purple {
  border-top: 3px solid var(--purple);
}

.card-number {
  font-size: 32px;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1;
}

.card-icon {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card--accent-blue .card-icon { color: var(--blue); }
.card--accent-green .card-icon { color: var(--green); }
.card--accent-purple .card-icon { color: var(--purple); }

.card-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.card-grid .card {
  margin-bottom: 0;
}

.card-grid--2 {
  grid-template-columns: repeat(3, 1fr);
}

/* Quote card */
.quote-card {
  background: linear-gradient(135deg, var(--blue-bg), var(--purple-bg));
  border-left: 3px solid var(--blue);
}

.quote-card blockquote {
  font-size: 17px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Achievements --- */
.achievement-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.achievement {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.achievement-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.achievement strong {
  display: block;
  margin-bottom: 2px;
}

.achievement p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Rankings --- */
.rankings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 15px;
}

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

.rank-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 4px;
  min-width: 80px;
  text-align: center;
}

.rank-badge--green {
  background: var(--green-light);
  color: var(--green);
}

.rank-badge--purple {
  background: var(--purple-light);
  color: var(--purple);
}

/* --- AP Table --- */
.ap-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 15px;
}

.ap-table th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 0;
  border-bottom: 2px solid var(--border);
}

.ap-table td {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-secondary);
}

.ap-table tr:last-child td {
  border-bottom: none;
}

.status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
}

.status--active {
  background: var(--green-light);
  color: var(--green);
}

.status--planned {
  background: var(--blue-light);
  color: var(--blue);
}

/* --- Progress bar (data-viz accent) --- */
.progress-section {
  margin-top: 4px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 3px;
  transition: width 1s ease;
}

.progress-fill--planned {
  background: linear-gradient(90deg, var(--purple), var(--blue));
  opacity: 0.5;
}

/* --- Blog --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.blog-grid .card h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 4px;
}

.blog-quote {
  font-style: italic;
  color: var(--text-secondary);
  border-left: 2px solid var(--border);
  padding-left: 14px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.7;
}

.blog-takeaway {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  border-left: 2px dashed var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 28px;
  width: 12px;
  height: 12px;
  background: var(--card-bg);
  border: 2px solid var(--blue);
  border-radius: 50%;
  z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
  border-color: var(--green);
}

.timeline-card {
  margin-bottom: 0;
}

.timeline-year {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.timeline-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.timeline-card p {
  font-size: 14px;
  margin: 0;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
  text-align: center;
}

.footer-inner p:first-child {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-quote {
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 100px;
    gap: 32px;
  }

  .hero-title {
    font-size: 36px;
  }

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

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

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

  .hero-node-cluster {
    display: none;
  }

  .card-grid,
  .card-grid--2,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .card {
    padding: 20px 20px;
  }

  .section {
    padding: 32px 16px;
  }

  .ap-table {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .stat-value {
    font-size: 22px;
  }

  .hero-stats {
    gap: 16px;
  }
}
