/* ─── Reset & Variables ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0d0d0d;
  --bg-alt:     #ffffff;
  --surface:    #1a1a1a;
  --surface-alt:#f0ede8;
  --border:     #2a2a2a;
  --border-alt: #d8d4ce;
  --text:       #f5f0e8;
  --text-alt:   #111111;
  --muted:      #d6d6d6;
  --muted-alt:  #333333;
  --accent:     #c8f04c;
  --accent-alt: #1a3fff;
  --ff-display: 'Bebas Neue', sans-serif;
  --ff-serif:   'Fraunces', serif;
  --ff-mono:    'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-mono);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ─── Noise overlay ─────────────────────────────────────────── */
.noise {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.25;
}

/* ─── Header ────────────────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem max(4rem, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(12px);
}

/* ─── Header scroll indicator ───────────────────────────────── */
/* ─── Header scroll indicator ───────────────────────────────── */
.header-scroll {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.header-scroll-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
  animation: bounceDown 1.6s ease-in-out infinite;
}

.header-scroll-text {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(-10px);    opacity: 1;   }
  50%       { transform: translateY(10px); opacity: 0.5; }
}
.header-scroll-arrow {
  font-size: 14px;
  color: var(--accent);
  animation: bounceDown 1.6s ease-in-out infinite;
  animation-delay: 0.25s;
  display: inline-block;
}

.nav { display: flex; gap: 3rem; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9rem max(4rem, calc((100vw - 1200px) / 2)) 7rem;
  position: relative;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}

.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

.hero-text { flex: 1; }

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.hero-photo {
  width: 280px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 0 auto;
}

.hero-photo img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center 5%;
  display: block;
}

.hero-socials {
  display: flex; gap: 1rem; justify-content: center;
}

.hero-socials a {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  border: 1px solid var(--border); padding: 7px 16px; border-radius: 100px;
  transition: color 0.2s, border-color 0.2s;
}
.hero-socials a:hover { color: var(--accent); border-color: var(--accent); }

.hero-meta {
  display: flex; gap: 1rem; align-items: center;
  color: var(--muted); font-size: 14px;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 5.5vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 2rem;
}

.hero-name em {
  font-family: var(--ff-serif);
  font-style: italic; font-weight: 200;
  color: var(--accent);
}

.hero-name .line-vo {
  font-size: clamp(4rem, 8vw, 8rem);
  display: block;
}

.hero-sub {
  max-width: 520px;
  font-size: 17px;
  color: var(--muted);
  font-family: var(--ff-serif);
  font-style: italic; font-weight: 200;
  line-height: 1.9;
  margin-bottom: 2rem;
}

/* ─── Reveal animations ─────────────────────────────────────── */
.line-reveal {
  display: block;
  opacity: 0; transform: translateY(20px);
  animation: revealUp 0.8s cubic-bezier(0.16,1,0.3,1) forwards;
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Section label ─────────────────────────────────────────── */
.section-label {
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-alt .section-label { color: var(--accent-alt); }
.section-alt .section-label::after { background: var(--border-alt); }

/* ─── Dark sections ─────────────────────────────────────────── */
.section-dark {
  background: var(--bg); color: var(--text);
  padding: 7rem max(4rem, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid var(--border);
}

/* ─── Light sections ────────────────────────────────────────── */
.section-alt {
  background: var(--bg-alt); color: var(--text-alt);
  padding: 7rem max(4rem, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid var(--border-alt);
}

/* ─── Timeline ──────────────────────────────────────────────── */
.timeline { position: relative; display: flex; flex-direction: column; }

.timeline::before {
  content: '';
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: var(--border-alt);
  transform: translateX(-50%);
}

.timeline-item { display: flex; width: 50%; padding-bottom: 4rem; position: relative; }
.timeline-item.left  { align-self: flex-start; justify-content: flex-end;  padding-right: 4rem; }
.timeline-item.right { align-self: flex-end;   justify-content: flex-start; padding-left: 4rem; }

.timeline-dot {
  position: absolute; width: 14px; height: 14px;
  background: var(--accent-alt); border-radius: 50%;
  top: 1.5rem; z-index: 2;
}
.timeline-item.left  .timeline-dot { right: -7px; }
.timeline-item.right .timeline-dot { left:  -7px; }

.timeline-card {
  background: #fff; border: 1px solid var(--border-alt);
  border-radius: 10px; overflow: hidden;
  max-width: 480px; width: 100%;
  opacity: 0; transform: translateY(24px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.timeline-card.visible {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.2s, box-shadow 0.2s;
}

.timeline-card:hover {
  border-color: var(--accent-alt);
  box-shadow: 0 8px 32px rgba(26,63,255,0.12);
  transform: translateY(-4px);
}

.timeline-img {
  width: 100%; height: 220px;
  object-fit: cover; object-position: center 60%;
  display: block;
}

.timeline-body { padding: 1.75rem; }

.timeline-year {
  font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent-alt); margin-bottom: 0.5rem;
}

.timeline-title {
  font-family: var(--ff-display); font-size: 2.2rem;
  letter-spacing: 0.02em; color: var(--text-alt);
  line-height: 1; margin-bottom: 0.4rem;
}

.timeline-role {
  font-family: var(--ff-serif); font-style: italic; font-weight: 200;
  font-size: 16px; color: var(--muted-alt); margin-bottom: 0.85rem;
}

.timeline-desc {
  font-size: 15px; color: var(--muted-alt); line-height: 1.8; margin-bottom: 1.1rem;
}

.timeline-body .project-tags span {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px;
  border: 1px solid #c5d0ff; color: var(--accent-alt); background: #eef1ff;
}

.timeline-body .project-links { margin-top: 1rem; }
.timeline-body .project-links a {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--accent-alt);
  border-bottom: 1px solid var(--accent-alt); padding-bottom: 1px;
  transition: opacity 0.2s;
}
.timeline-body .project-links a:hover { opacity: 0.6; }

/* ─── Project cards ─────────────────────────────────────────── */
.projects { display: flex; flex-direction: column; }

.project-card {
  display: flex; align-items: flex-start; gap: 2.5rem;
  padding: 3rem 0; border-bottom: 1px solid var(--border);
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease, background 0.2s, padding 0.2s;
  cursor: pointer;
}

.project-card:last-child { border-bottom: none; }
.project-card.visible { opacity: 1; transform: translateY(0); }

.section-dark .project-card:hover {
  background: var(--surface);
  padding-left: 1.5rem; padding-right: 1.5rem; border-radius: 8px;
}

.project-number { font-size: 14px; color: var(--muted); width: 36px; flex-shrink: 0; padding-top: 8px; }
.project-metrics-mini {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 12px;
  color: #94a3b8; /* Muted slate */
  border-left: 2px solid #38bdf8; /* Cyan accent line */
  padding-left: 0.8rem;
}

.project-metrics-mini strong {
  color: #f1f5f9;
}

.project-metrics-mini {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 13px;
  color: var(--muted);
}
.project-metrics-mini strong {
  color: var(--accent);
}

/* Ensure tags and links match your Project 01 spacing */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-links {
  display: flex;
  gap: 1.5rem;
}

.project-title {
  font-family: var(--ff-display); font-size: 3.4rem;
  letter-spacing: 0.02em; color: var(--text);
  margin-bottom: 0.6rem; line-height: 1;
}

.project-desc {
  font-size: 16px; color: var(--muted);
  max-width: 580px; margin-bottom: 1.2rem; line-height: 1.8;
}

.section-dark .project-tags span {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px;
  border: 1px solid #333; color: var(--muted); background: #1a1a1a;
}

.project-links { display: flex; gap: 1.5rem; margin-top: 0.75rem; }
.project-links a {
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--accent);
  border-bottom: 1px solid var(--accent); padding-bottom: 1px;
  transition: opacity 0.2s;
}
.project-links a:hover { opacity: 0.6; }

.project-img-wrap {
  width: 260px; flex-shrink: 0;
  border-radius: 6px; overflow: hidden; border: 1px solid var(--border);
}
.project-img-wrap img {
  width: 100%; height: 160px; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.project-card:hover .project-img-wrap img { transform: scale(1.04); }

/* ─── Skills grid ───────────────────────────────────────────── */
.skills-grid {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 1.25rem;
}

.skill-badge {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.75rem; padding: 1.75rem 1rem; width: 150px;
  border: 1px solid var(--border-alt); border-radius: 10px;
  background: #fff; cursor: default;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.skill-badge:hover {
  border-color: var(--accent-alt);
  box-shadow: 0 4px 20px rgba(26,63,255,0.1);
  transform: translateY(-4px);
}
.skill-badge i { font-size: 2.4rem; color: var(--accent-alt); }
.skill-badge span {
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-alt); text-align: center; line-height: 1.3;
}

@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1) translateY(-4px); }
  100% { transform: scale(1); }
}
.skill-badge.pop { animation: pop 0.3s ease; }

/* ─── Education ─────────────────────────────────────────────── */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }

.edu-card {
  padding: 2rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; cursor: default;
}
.edu-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(200,240,76,0.1);
  transform: translateY(-4px);
}

.edu-img-oulu {
  width: 100%; height: 200px;
  object-fit: cover; object-position: center 50%;
  border-radius: 4px; margin-bottom: 1.25rem; display: block;
  border: 1px solid var(--border);
}

.edu-img-gcu {
  width: 100%; height: 200px;
  object-fit: cover; object-position: center 50%;
  border-radius: 4px; margin-bottom: 1.25rem; display: block;
  border: 1px solid var(--border);
}

.edu-year { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.edu-school { font-family: var(--ff-display); font-size: 1.9rem; letter-spacing: 0.02em; color: var(--text); margin-bottom: 0.5rem; line-height: 1.1; }
.edu-degree { font-size: 15px; color: var(--muted); margin-bottom: 0.3rem; font-family: var(--ff-serif); font-style: italic; font-weight: 200; line-height: 1.5; }
.edu-location { font-size: 13px; color: var(--muted); letter-spacing: 0.08em; margin-top: 0.5rem; }

/* ─── Contact ───────────────────────────────────────────────── */
.contact-body { display: flex; flex-direction: column; gap: 1.5rem; }

.contact-cta {
  font-family: var(--ff-display);
  font-size: clamp(4rem, 9vw, 9rem);
  line-height: 0.92; letter-spacing: 0.01em; color: var(--text-alt);
}

.contact-email {
  font-size: 17px; color: var(--accent-alt); text-decoration: none;
  letter-spacing: 0.05em; border-bottom: 1px solid var(--accent-alt);
  padding-bottom: 2px; width: fit-content; transition: opacity 0.2s;
}
.contact-email:hover { opacity: 0.6; }

.contact-links { display: flex; gap: 2.5rem; margin-top: 0.5rem; }
.contact-links a {
  color: var(--muted-alt); text-decoration: none; font-size: 15px;
  letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.5rem; transition: color 0.2s;
}
.contact-links a:hover { color: var(--text-alt); }

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column; /* Stacks children vertically */
  align-items: center;    /* Centers items horizontally */
  gap: 1.5rem;            /* Space between top and bottom sections */
  background-color: #0f172a;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: #94a3b8;         /* Muted slate color */
  letter-spacing: 0.08em;
  text-align: center;
}

.footer-top, .footer-socials {
  display: flex;
  gap: 2rem;              /* Horizontal space between links */
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: #f1f5f9;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #38bdf8;
}

.footer-bottom {
  display: flex;
  gap: 10px;
  opacity: 0.8;
}

.separator {
  color: var(--border);
}

/* Responsive adjustment for small screens */
@media (max-width: 600px) {
  .footer-top {
    flex-direction: column;
    gap: 1rem;
  }
}


/* ─── Back to top ───────────────────────────────────────────── */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 200;
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bg); background: var(--accent);
  text-decoration: none; padding: 10px 18px; border-radius: 4px;
  opacity: 0; pointer-events: none;
  box-shadow: 0 4px 20px rgba(200,240,76,0.25);
  transition: opacity 0.3s, transform 0.2s;
  font-family: var(--ff-mono);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header { padding: 1rem 1.5rem; }
  .header-scroll-text { display: none; }
  .nav { gap: 1rem; flex-wrap: wrap; }
  .nav a { font-size: 11px; }
  .hero { padding: 7rem 1.5rem 5rem; }
  .hero-inner { flex-direction: column-reverse; gap: 2rem; align-items: flex-start; }
  .hero-right { width: 100%; }
  .hero-photo { width: 100%; }
  .hero-photo img { height: 260px; object-position: center 10%; }
  .section-dark, .section-alt { padding: 4rem 1.5rem; }
  .edu-grid { grid-template-columns: 1fr; }
  .project-img-wrap { display: none; }
  .skills-grid { gap: 0.75rem; }
  .skill-badge { width: 120px; padding: 1.25rem 0.75rem; }
  .footer { padding: 1.5rem; flex-direction: column; gap: 0.5rem; }
  .timeline::before { left: 10px; }
  .timeline-item { width: 100%; padding-bottom: 2.5rem; }
  .timeline-item.left,
  .timeline-item.right { padding-left: 2.5rem; padding-right: 0; align-self: unset; justify-content: flex-start; }
  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot { left: 4px; right: auto; }
  .timeline-card { max-width: 100%; }
}

.cv-btn {
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 7px 16px;
  border-radius: 100px;
  transition: background 0.2s, color 0.2s;
}

.cv-btn:hover {
  background: transparent;
  color: var(--accent);
}