/* ROOT VARIABLES */

:root {
  --bg: #fff9f2;
  --bg-card: #fffcf8;
  --bg-nav: rgba(255, 249, 242, 0.8);
  --text: #1a1c22;
  --text-muted: #5a5a62;
  --text-faint: #8a7e66;
  --border: #ecddd0;
  --border-scroll: #e8e0d8;
  --accent: #fd4815;
  --badge-bg: #fff0e8;
  --badge-border: #fdd5c0;
  --placeholder: #f0e8df;
  --placeholder-2: #e8e0d8;
  --shadow: rgba(26, 28, 34, 0.08);
}

[data-theme="dark"] {
  --bg: #111113;
  --bg-card: #1c1c1f;
  --bg-nav: rgba(17, 17, 19, 0.85);
  --text: #edeae4;
  --text-muted: #8a8892;
  --text-faint: #55555e;
  --border: #2a2a2f;
  --border-scroll: #252528;
  --badge-bg: #2a1810;
  --badge-border: #4a2a1a;
  --placeholder: #252528;
  --placeholder-2: #1e1e22;
  --shadow: rgba(0, 0, 0, 0.35);
}

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

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: "Geist", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  cursor: none;
  transition:
    background 0.3s,
    color 0.3s;
}

a,
button {
  cursor: none;
}

/* NAV */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 10%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s,
    background 0.3s;
  z-index: 100;
  animation: navSlideDown 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes navSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

body {
  padding-top: 80px;
}

.nav.scrolled {
  border-bottom-color: var(--border-scroll);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  font-weight: 600;
  font-size: 18px;
}

.nav-links a {
  margin-left: 30px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  position: relative;
}

.nav-links a:after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: 0.3s;
}

.nav-links a:hover:after {
  width: 100%;
}

/* THEME TOGGLE */

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-left: 16px;
  transition:
    border-color 0.25s,
    color 0.25s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-sun {
  display: none;
}
.icon-moon {
  display: block;
}

[data-theme="dark"] .icon-sun {
  display: block;
}
[data-theme="dark"] .icon-moon {
  display: none;
}

/* HAMBURGER */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  margin-left: 12px;
  color: var(--text);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* MOBILE MENU */

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 98;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  overflow: hidden;
}

.mobile-menu.open {
  display: flex;
  animation: menuFadeIn 0.3s ease;
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-link {
  font-family: "Instrument Serif", serif;
  font-size: 42px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  transition:
    color 0.2s,
    transform 0.2s;
}

.mobile-link:hover {
  color: var(--accent);
  transform: translateX(6px);
}

/* CURSOR */

.cursor-blob {
  position: fixed;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: difference;
  z-index: 9999;
  will-change: transform;
}

/* HIGHLIGHT */

.highlight {
  font-style: italic;
  color: var(--accent);
}

/* BADGE */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

/* HERO */

.hero {
  padding: 140px 24px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.hero .badge {
  animation: fadeUp 0.6s 0.3s ease both;
}
.hero h1 {
  animation: fadeUp 0.8s 0.45s ease both;
}
.hero > p {
  animation: fadeUp 0.6s 0.65s ease both;
}
.hero-buttons {
  animation: fadeUp 0.6s 0.8s ease both;
}

.hero h1 {
  font-family: "Instrument Serif", serif;
  font-size: 60px;
  font-weight: 400;
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.hero-buttons a {
  text-decoration: none;
  font-size: 15px;
}

.primary-btn,
.secondary-btn {
  position: relative;
  overflow: hidden;
  border-radius: 100px;
  padding: 12px 24px;
  min-width: 160px;
  justify-content: center;
  z-index: 0;
  transition:
    color 0.3s,
    border-color 0.3s,
    transform 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.primary-btn::before,
.secondary-btn::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: conic-gradient(
    from 0deg,
    #fd4815,
    #ff8533,
    #ffcc00,
    #ff4500,
    #fd4815
  );
  border-radius: 40% 60% 55% 45% / 45% 55% 60% 40%;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: liquidMorph 4s ease-in-out infinite;
  z-index: -1;
}

.primary-btn:hover::before,
.secondary-btn:hover::before {
  opacity: 1;
}

@keyframes liquidMorph {
  0% {
    border-radius: 40% 60% 55% 45% / 45% 55% 60% 40%;
    transform: rotate(0deg);
  }
  25% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: rotate(180deg);
  }
  75% {
    border-radius: 55% 45% 60% 40% / 40% 60% 45% 55%;
  }
  100% {
    border-radius: 40% 60% 55% 45% / 45% 55% 60% 40%;
    transform: rotate(360deg);
  }
}

.primary-btn {
  background: var(--accent);
  color: white;
}

.primary-btn:hover {
  transform: translateY(-2px);
  color: white;
}

.secondary-btn {
  color: var(--text);
  border: 1.5px solid var(--text);
  background: transparent;
}

.secondary-btn:hover {
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
}

/* WORK */

.work {
  padding: 100px 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.work h2 {
  font-family: "Instrument Serif", serif;
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 40px;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-link {
  text-decoration: none;
  color: inherit;
}

.project-link:last-child:nth-child(odd) .project {
  grid-column: 1 / -1;
  max-width: calc(50% - 14px);
}

.project {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.project-link:hover .project {
  transform: translateY(-8px);
  box-shadow: 0 28px 56px var(--shadow);
  border-color: var(--accent);
}

.project-img {
  height: 280px;
  overflow: hidden;
  background: var(--placeholder);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-link:hover .project-img img {
  transform: scale(1.06);
}

.project-body {
  padding: 24px 28px 28px;
}

.project-title {
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--text);
}

.project-body p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

.project-cta .cta-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

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

.project-link:hover .project-cta .cta-arrow {
  transform: translateX(4px);
}

/* ABOUT */

.about {
  padding: 120px 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.about h2 {
  font-family: "Instrument Serif", serif;
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 36px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: start;
}

.about-intro {
  font-size: 20px;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 32px;
}

/* Section labels */

.about-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
  margin-top: 24px;
}

/* Skills */

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill {
  font-size: 13px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 100px;
  transition:
    border-color 0.25s,
    color 0.25s;
}

.skill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Tools */

.tools {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition:
    border-color 0.25s,
    transform 0.25s;
}

.tool-item:hover .tool-icon {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.tool-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.tool-icon svg {
  width: 26px;
  height: 40px;
}

.xd-icon {
  background: #470137;
  border-color: #470137;
  color: #ff61f6;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.tool-item > span {
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
}

/* Interests */

.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interests span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  line-height: 1;
  color: var(--text-muted);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  padding: 6px 14px;
  border-radius: 100px;
}

/* Journey accordion */

.journey {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.journey summary {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  cursor: none;
}

.journey summary::-webkit-details-marker {
  display: none;
}

.journey summary::after {
  content: "+";
  font-size: 20px;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.3s ease;
}

.journey[open] summary::after {
  content: "−";
}

.journey-body {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
}

/* EXPERIENCE */

.experience {
  display: flex;
  flex-direction: column;
}

.exp-entry {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.exp-entry-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 2px;
}

.exp-timeline-line {
  width: 2px;
  min-height: 28px;
  height: max-content;
  flex: 1;
  background: var(--border);
  margin-top: 8px;
  margin-bottom: 8px;
  transform-origin: top;
}

.exp-entry-right {
  flex: 1;
  padding-bottom: 28px;
}

.exp-entry--last .exp-entry-right {
  padding-bottom: 0;
}

.exp-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.exp-logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.exp-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px;
  flex-shrink: 0;
}

.exp-role {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.exp-company-name {
  font-size: 13px;
  color: var(--text-faint);
}

.exp-period-badge {
  font-size: 11px;
  color: var(--accent);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  padding: 3px 10px;
  border-radius: 100px;
  flex-shrink: 0;
  white-space: nowrap;
}

.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-list li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.65;
}

.exp-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  top: 3px;
}

/* Photos */

.about-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 100px;
}

.photo-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: var(--placeholder);
}

.photo-desk {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: var(--placeholder-2);
}

@media (max-width: 768px) {
  /* NAV */
  body {
    padding-top: 60px;
  }
  .nav {
    padding: 20px 24px;
  }
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .theme-toggle {
    margin-left: 8px;
  }

  /* HERO */
  .hero {
    padding: 72px 24px 56px;
  }
  .hero h1 {
    font-size: 34px;
    line-height: 1.2;
  }
  .hero p {
    font-size: 15px;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .hero-buttons a {
    width: 100%;
  }
  .primary-btn,
  .secondary-btn {
    width: 100%;
    min-width: unset;
    justify-content: center;
  }

  /* WORK */
  .work {
    padding: 60px 24px;
  }
  .work h2 {
    font-size: 26px;
  }
  .projects {
    grid-template-columns: 1fr;
  }
  .project-link:last-child:nth-child(odd) .project {
    grid-column: auto;
    max-width: 100%;
  }
  .project-img {
    height: 220px;
  }

  /* ABOUT */
  .about {
    padding: 60px 24px;
  }
  .about h2 {
    font-size: 26px;
    margin-bottom: 24px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-right {
    flex-direction: column;
    position: static;
    gap: 10px;
  }
  .photo-portrait {
    width: 100%;
    height: 260px;
    aspect-ratio: auto;
    flex: none;
  }
  .photo-desk {
    display: none;
  }
  .about-highlights {
    flex-direction: column;
    gap: 10px;
  }

  /* EXPERIENCE — no changes needed, already vertical */
  .exp-entry-header {
    flex-wrap: wrap;
  }
  .exp-period-badge {
    order: -1;
  }

  /* FOOTER */
  .footer-inner {
    padding: 48px 24px 36px;
  }
  .footer-top {
    flex-direction: column;
    gap: 6px;
    margin-bottom: 32px;
  }
  .footer-top h2 {
    font-size: 30px;
  }
  .footer-links {
    margin-bottom: 40px;
  }
  .footer-links a {
    font-size: 22px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}

/* FOOTER */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 24px 48px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 48px;
}

.footer-top h2 {
  font-family: "Instrument Serif", serif;
  font-size: 40px;
  font-weight: 400;
  color: var(--text);
}

.footer-brand {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 56px;
}

.footer-links a {
  display: inline-flex;
  text-decoration: none;
  color: var(--text);
  font-size: 28px;
  font-weight: 500;
  transition:
    color 0.25s,
    transform 0.25s;
  width: fit-content;
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateX(6px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
}

/* ANIMATIONS */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Project card stagger */
.work.revealed .project {
  animation: fadeUp 0.55s ease both;
  animation-delay: 0.2s;
}
.work.revealed .project:nth-child(2) {
  animation-delay: 0.32s;
}
.work.revealed .project:nth-child(3) {
  animation-delay: 0.44s;
}
.work.revealed .project:nth-child(4) {
  animation-delay: 0.56s;
}
.work.revealed .project:nth-child(5) {
  animation-delay: 0.68s;
}

/* Experience entry stagger */
.about.revealed .exp-entry {
  animation: fadeUp 0.5s ease both;
}
.about.revealed .exp-entry:nth-child(1) {
  animation-delay: 0.3s;
}
.about.revealed .exp-entry:nth-child(2) {
  animation-delay: 0.45s;
}
.about.revealed .exp-entry:nth-child(3) {
  animation-delay: 0.6s;
}

/* Timeline line draw */
@keyframes lineGrow {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
.about.revealed .exp-entry:nth-child(1) .exp-timeline-line {
  animation: lineGrow 0.5s 0.55s ease both;
}
.about.revealed .exp-entry:nth-child(2) .exp-timeline-line {
  animation: lineGrow 0.5s 0.75s ease both;
}
