﻿:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --bg-soft: #ffffff;
  --ink: #0b0d12;
  --muted: #5d6270;
  --accent: #1d1f26;
  --accent-soft: rgba(11, 13, 18, 0.08);
  --card: rgba(255, 255, 255, 0.7);
  --stroke: rgba(15, 17, 21, 0.08);
  --shadow: 0 28px 60px rgba(15, 17, 21, 0.12);
  --radius: 24px;
  --icon-filter: none;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-serif: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, #ffffff 0%, #f4f6fb 45%, #edf0f7 100%);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.75;
  animation: float 18s ease-in-out infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at top, rgba(11, 13, 18, 0.12), rgba(11, 13, 18, 0));
  top: -180px;
  left: -140px;
}

.orb-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at top, rgba(11, 13, 18, 0.08), rgba(11, 13, 18, 0));
  bottom: -200px;
  right: -160px;
  animation-delay: -6s;
}

.orb-3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at top, rgba(11, 13, 18, 0.1), rgba(11, 13, 18, 0));
  top: 45%;
  right: 12%;
  animation-delay: -12s;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 17, 21, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 17, 21, 0.04) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.18;
}

.hero {
  padding: 32px 6vw 32px;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  color: var(--muted);
}

.icon-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.icon-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: var(--icon-filter);
}

.icon-link:hover {
  transform: translateY(-2px);
}

.hero-inner {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 4.2vw, 4.8rem);
  line-height: 1.02;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-portrait {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(15, 17, 21, 0.12);
  box-shadow: 0 18px 40px rgba(15, 17, 21, 0.12);
  margin-bottom: 18px;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.lead {
  font-size: 1.08rem;
  max-width: 560px;
  margin-bottom: 28px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn.primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.75);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(34, 24, 14, 0.18);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  align-items: center;
}

.hero-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
  transform-style: preserve-3d;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  margin-top: 20px;
}

.card-header h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-top: 4px;
}

.timeline {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.timeline-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(15, 17, 21, 0.06);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.timeline-item:hover {
  transform: translateY(-2px);
}

.timeline-item .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.timeline-item span {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: 0.9rem;
}

.card-footer {
  margin-top: 24px;
  color: var(--muted);
}

main {
  padding: 0 6vw 70px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.section-header h3 {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  letter-spacing: -0.01em;
}

.cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 50px rgba(15, 17, 21, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(12px);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(15, 17, 21, 0.16);
}

.card h4 {
  font-size: 1.25rem;
}

.project-title-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-title-link::after {
  content: "↗";
  font-size: 0.9rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.project-title-link:hover::after {
  transform: translate(2px, -2px);
}

.card .meta {
  color: var(--muted);
  font-weight: 500;
}

.card .date {
  color: var(--muted);
  font-size: 0.9rem;
}

.card ul {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 0.98rem;
}

.card ul .course-desc {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.card ul li::before {
  content: "—";
  margin-right: 8px;
  color: var(--accent);
}

.card p {
  color: var(--muted);
}

.project-card .project-media {
  margin: -22px -22px 14px;
  border: none;
  background: transparent;
  padding: 0;
  width: calc(100% + 44px);
  border-bottom: 1px solid rgba(15, 17, 21, 0.08);
  position: relative;
  text-align: left;
}

.project-card .project-media button,
.project-card .project-media[role="button"] {
  cursor: zoom-in;
}

.project-card .project-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
}

.project-card--contain .project-media img {
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: rgba(15, 17, 21, 0.08);
}

.project-card .project-media-label {
  position: absolute;
  left: 16px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(11, 13, 18, 0.68);
  color: #fff;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 50;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(6px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(1100px, 90vw);
  width: 90vw;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.lightbox-image {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
  background: rgba(15, 17, 21, 0.35);
}

.lightbox-caption {
  color: #eef1f6;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 17, 21, 0.75);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}

.no-scroll {
  overflow: hidden;
}

.skill-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.skill-group {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 17, 21, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.skill-group:hover {
  transform: translateY(-3px);
}

.skill-group h5 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 8px;
}

.highlight {
  border: 1px solid rgba(15, 17, 21, 0.12);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(236, 239, 246, 0.92));
  transform-style: preserve-3d;
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.experience-media {
  margin: -22px auto 16px;
  border-bottom: 1px solid rgba(15, 17, 21, 0.08);
  max-width: 640px;
  width: 100%;
  padding: 0 6px 12px;
}

.experience-media img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  display: block;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  background: rgba(15, 17, 21, 0.08);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
}

.footer {
  padding: 32px 6vw 50px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid rgba(15, 17, 21, 0.12);
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(18px);
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 40px;
  }

  .hero-card {
    order: -1;
  }

  .exp-header {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 30px;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c10;
    --bg-soft: #12141a;
    --ink: #f5f6f8;
    --muted: #b6bcc8;
    --accent: #f5f6f8;
    --accent-soft: rgba(245, 246, 248, 0.12);
    --card: rgba(18, 20, 26, 0.72);
    --stroke: rgba(245, 246, 248, 0.12);
    --shadow: 0 28px 60px rgba(0, 0, 0, 0.4);
    --icon-filter: invert(1);
  }

  body {
    background: radial-gradient(circle at top, #13151b 0%, #0b0c10 55%, #07080b 100%);
  }

  .grid {
    background-image: linear-gradient(rgba(245, 246, 248, 0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(245, 246, 248, 0.06) 1px, transparent 1px);
    opacity: 0.14;
  }

  .orb-1,
  .orb-2,
  .orb-3 {
    opacity: 0.55;
  }

  .btn.primary {
    background: #f5f6f8;
    color: #0b0c10;
  }

  .btn.ghost {
    background: rgba(18, 20, 26, 0.7);
    color: var(--ink);
  }

  .icon-link {
    background: transparent;
    border-color: transparent;
  }

  .skill-group {
    background: rgba(22, 24, 30, 0.9);
    border-color: rgba(245, 246, 248, 0.08);
    color: var(--ink);
  }

  .skill-group h5 {
    color: #d7dbe6;
  }

  .timeline-item {
    background: rgba(18, 20, 26, 0.7);
  }

  .highlight {
    background: linear-gradient(150deg, rgba(18, 20, 26, 0.9), rgba(27, 30, 38, 0.9));
  }
}
