:root {
  --bg: #fff8f2;
  --surface: #ffffff;
  --surface-alt: #fff1e3;
  --ink: #1e1b2e;
  --ink-soft: #5b5873;
  --accent: #ff8a3d;
  --accent-2: #ff5c8a;
  --accent-3: #3ec5c1;
  --line: rgba(30, 27, 46, 0.08);
  --shadow: 0 20px 60px -30px rgba(255, 120, 40, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---------- Focus styles (keyboard accessibility) ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible,
.social:focus-visible,
.lang-btn:focus-visible,
.lang-menu li:focus-visible {
  outline-offset: 4px;
}
.project:focus-visible,
.card:focus-visible,
.edu-card:focus-visible,
.tl-card:focus-visible {
  outline-offset: 6px;
}
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: rgba(255, 248, 242, 0.85);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  font-size: 1.05rem;
}
.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.18);
}
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); }

/* ---------- Language switcher ---------- */
.lang-switcher { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.lang-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.flag {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.flag svg { width: 100%; height: 100%; display: block; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 48px -20px rgba(30, 27, 46, 0.3);
  min-width: 200px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s;
}
.lang-switcher.open .lang-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
}
.lang-menu li:hover, .lang-menu li:focus { background: var(--surface-alt); outline: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 138, 61, 0.22), transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(62, 197, 193, 0.2), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(255, 92, 138, 0.18), transparent 55%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  position: relative;
}
.eyebrow {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 138, 61, 0.12);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  line-height: 1.08;
  margin: 18px 0 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1e1b2e 0%, #ff5c8a 60%, #ff8a3d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 52ch;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 24px 70px -28px rgba(255, 92, 138, 0.6); }
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }
.hero-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-chips li {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.hero-photo {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 50px 100px -40px rgba(30, 27, 46, 0.45);
  transform: rotate(1deg);
  max-width: 380px;
  margin: 0 auto;
  justify-self: end;
  width: 100%;
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
}
.section-alt {
  background: linear-gradient(180deg, transparent, rgba(255, 138, 61, 0.06), transparent);
}
.section-head {
  text-align: center;
  margin: 0 auto 56px;
  max-width: 640px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- About cards ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 70px -40px rgba(255, 138, 61, 0.35);
  border-color: rgba(255, 138, 61, 0.35);
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Skills / Expertise ---------- */
.skills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.skill {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}
.skill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.skill:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 138, 61, 0.35);
  box-shadow: 0 30px 70px -40px rgba(255, 138, 61, 0.4);
}
.skill:hover::before { transform: scaleX(1); }
.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.15), rgba(255, 92, 138, 0.15));
  color: var(--accent);
  margin-bottom: 14px;
}
.skill h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.skill p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 700px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}
.timeline li {
  position: relative;
  padding-left: 54px;
  margin-bottom: 28px;
}
.timeline li:last-child { margin-bottom: 0; }
.tl-dot {
  position: absolute;
  left: 6px;
  top: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.15);
}
.tl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px 24px;
  border-radius: var(--radius);
}
.tl-card h3 { margin: 6px 0 8px; font-size: 1.2rem; }
.tl-card h3 a {
  text-decoration: none;
  color: inherit;
  background-image: linear-gradient(90deg, var(--accent), var(--accent-2));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 0 100%;
  transition: background-size 0.3s;
}
.tl-card h3 a:hover { background-size: 100% 2px; color: var(--accent); }
.tl-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.tl-period {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 138, 61, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 840px;
  margin: 0 auto;
}
.edu-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  overflow: hidden;
}
.edu-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.edu-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 138, 61, 0.35);
  box-shadow: 0 30px 70px -40px rgba(255, 138, 61, 0.35);
}
.edu-badge {
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.edu-period {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 138, 61, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.edu-card h3 { margin: 4px 0 6px; font-size: 1.2rem; }
.edu-degree { margin: 0 0 10px; color: var(--ink-soft); font-size: 0.95rem; }
.edu-meta { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.edu-meta strong { color: var(--ink); font-weight: 700; }

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}
.project::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255, 138, 61, 0.08));
  opacity: 0;
  transition: opacity 0.3s;
}
.project:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 138, 61, 0.4);
  box-shadow: 0 30px 70px -40px rgba(255, 138, 61, 0.35);
}
.project:hover::before { opacity: 1; }
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.project-logo { font-size: 2rem; }
.project-arrow {
  color: var(--ink-soft);
  transition: transform 0.25s, color 0.25s;
}
.project:hover .project-arrow { transform: translate(3px, -3px); color: var(--accent); }
.project h3 { margin: 0 0 10px; font-size: 1.3rem; }
.project p { margin: 0 0 18px; color: var(--ink-soft); font-size: 0.95rem; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.project-tags span {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--surface-alt);
  border-radius: 999px;
  color: var(--ink);
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 20px 60px -40px rgba(30, 27, 46, 0.4);
  transition: transform 0.35s;
}
.gallery figure:hover { transform: scale(1.02) rotate(-0.4deg); }
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.gallery figure:hover img { transform: scale(1.08); }

/* ---------- Contact ---------- */
.contact-inner { text-align: center; }
.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.social:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px -24px rgba(255, 138, 61, 0.5);
}

/* ---------- Footer ---------- */
.footer {
  padding: 32px 0 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .about-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .hero { padding: 48px 0 72px; }
  .section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .container { padding: 0 20px; }
  .lang-btn span:not(.flag) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
