:root {
  --bg: #050505;
  --panel: #0d0d0d;
  --text: #f5f5f5;
  --muted: #a6a6a6;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.26);
  --pill: rgba(255, 255, 255, 0.035);
  --max: 1440px;
  --radius: 28px;
}

body.light-theme {
  --bg: #f8f8f8;
  --panel: #ffffff;
  --text: #121212;
  --muted: #666666;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.18);
  --pill: rgba(0, 0, 0, 0.025);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.5;
  background: linear-gradient(135deg, #050505, #111111, #0a0a0a, #1a1a1a);
  background-size: 400% 400%;
  animation: bgShift 14s ease-in-out infinite alternate;
  transition: background 0.3s ease, color 0.3s ease;
}

body.light-theme {
  background: linear-gradient(135deg, #f8f8f8, #efefef, #f2f2f2, #e8e8e8);
}

@keyframes bgShift {
  0% {
    background-position: 0% 0%;
  }

  33% {
    background-position: 100% 50%;
  }

  66% {
    background-position: 50% 100%;
  }

  100% {
    background-position: 0% 50%;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

textarea {
  resize: none;
  overflow-y: auto;
}

/* Chrome, Edge, Brave */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0d0d0d;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) #0d0d0d;
}

img {
  max-width: 100%;
  display: block;
}

/* overlays */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  z-index: 0;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px);
  background-size: 18px 18px;
}

body.light-theme .noise {
  opacity: 0.03;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(0, 0, 0, 0.1) 0 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(0, 0, 0, 0.08) 0 1px, transparent 1px);
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 68%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  filter: blur(18px);
}

body.light-theme .cursor-glow {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.04), transparent 68%);
}

.theme-toggle {
  background: var(--pill);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s ease;
  width: 42px;
  height: 42px;
}

.theme-toggle:hover {
  background: var(--line);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* base section */
.section {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 110px 60px;
}

/* hero */
.hero {
  min-height: 100vh;
  padding-top: 36px;
  padding-bottom: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
}

.hero-nav-pills {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-nav-pills a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--pill);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: 0.25s ease;
  white-space: nowrap;
}

.hero-nav-pills a:hover,
.site-footer a:hover,
.socials a:hover,
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--line);
}

.hero-title {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 24px 0 16px;
}

.hero-title {
  text-shadow: 0 0 25px rgba(146, 148, 204, 0.4);
}

.hero-title h1 {
  width: 100%;
  font-size: clamp(4rem, 11vw, 10.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 48px;
  align-items: end;
  padding-bottom: 8px;
}

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-self: end;
}

.hero-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--pill);
  color: var(--muted);
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.hero-tags span:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body.light-theme .hero-tags span:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.hero-intro {
  justify-self: end;
  width: 100%;
}

.hero-intro p {
  font-size: clamp(0.95rem, 1.3vw, 1.18rem);
  line-height: 1.7;
  color: var(--text);
  opacity: 0.85;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.95rem;
  transition: 0.25s ease;
  cursor: pointer;
}

.btn-solid {
  background: #ffffff;
  color: #050505;
  border-color: transparent;
}

.btn-solid:hover {
  background: #e8e8e8;
}

.btn-outline {
  background: transparent;
  color: var(--text);
}

/* section headers */
.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 48px;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}

.section-head h2 {
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800;
}

/* projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 32px;
  overflow: hidden;
  background: var(--panel);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.project-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.project-card:hover {
  box-shadow: 0 0 30px rgba(129, 129, 129, 0.25);
  transform: translateY(-5px);
}

.project-visual {
  position: relative;
  height: 380px;
  overflow: hidden;
  background: #111;
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-visual img {
  transform: scale(1.05);
}

.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.08), transparent);
}

.project-visual span {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.project-meta {
  padding: 22px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
}

.project-year {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.project-meta h3 {
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.project-meta a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.project-meta a:hover {
  color: var(--text);
}

/* about */
.about-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.about-copy {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--pill);
}

.about-copy p {
  font-size: 1.05rem;
  color: var(--text);
  opacity: 0.9;
  line-height: 1.85;
  margin-bottom: 18px;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.stats-grid {
  display: grid;
  gap: 16px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: var(--pill);
  transition: border-color 0.25s ease;
}

.stat-card:hover {
  border-color: var(--line-strong);
}

.stat-card h3 {
  font-size: 2.8rem;
  line-height: 1;
  letter-spacing: -0.06em;
  margin-bottom: 8px;
}

.stat-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* services + timeline */
.services-list,
.timeline {
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 60px 220px 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr 140px;
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.service-row:hover,
.timeline-row:hover {
  background: rgba(255, 255, 255, 0.015);
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 12px;
  margin: 0 -8px;
}

.service-row span,
.timeline-year {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.service-row h3,
.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.service-row p,
.timeline-place {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ── MARQUEE ── */
.marquee-section {
  width: 100%;
  overflow: hidden;
  padding: 36px 0;
  background: var(--pill);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  width: 120px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee-scroll 26s linear infinite;
  will-change: transform;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 100px;
  flex: 0 0 auto;
  margin-right: 100px;
}

.tech-logo {
  height: 48px;
  width: auto;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: 0.65;
  filter: grayscale(100%) brightness(0.8);
  transition: transform 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
}

.tech-logo:hover {
  opacity: 1;
  filter: grayscale(0%) brightness(1);
  transform: scale(1.1);
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* contact */
.contact-box {
  border: 1px solid var(--line);
  border-radius: 36px;
  padding: 40px;
  background: var(--panel);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}

.contact-copy h2 {
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 10px 0 18px;
}

.contact-text {
  color: var(--text);
  opacity: 0.8;
  max-width: 500px;
  margin-bottom: 22px;
  line-height: 1.75;
  font-size: 0.98rem;
}

.email-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 22px;
  transition: opacity 0.2s ease;
}

.email-link:hover {
  opacity: 0.7;
}

.socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.socials a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: 0.25s ease;
}

.socials a:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
  padding: 14px 18px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.form-note {
  color: var(--muted);
  min-height: 20px;
  font-size: 0.9rem;
}

/* footer */
.site-footer {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 60px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.site-footer p {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 0.95rem;
}

.site-footer div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* typewriter */
.typewriter-line {
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: 14px;
  letter-spacing: 0.02em;
  min-height: 1.6em;
}

.typewriter-line::after {
  content: "|";
  animation: blink 0.7s infinite;
  margin-left: 2px;
  color: var(--muted);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* responsive */
@media (max-width: 1280px) {
  .section {
    padding: 100px 48px;
  }

  .site-footer {
    padding: 0 48px 40px;
  }

  .hero-title h1 {
    font-size: clamp(3.5rem, 10vw, 9rem);
  }
}

@media (max-width: 1100px) {
  .section {
    padding: 90px 40px;
  }

  .site-footer {
    padding: 0 40px 36px;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-intro {
    justify-self: start;
    max-width: 600px;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-box {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .service-row {
    grid-template-columns: 60px 200px 1fr;
    gap: 16px;
  }

  .timeline-row {
    grid-template-columns: 200px 1fr 140px;
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .hero-title h1 {
    font-size: clamp(3rem, 9vw, 7rem);
    white-space: normal;
    word-break: break-word;
  }

  .service-row {
    grid-template-columns: 50px 160px 1fr;
    gap: 12px;
  }

  .timeline-row {
    grid-template-columns: 180px 1fr 120px;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 20px;
  }

  .section-head {
    gap: 10px;
    margin-bottom: 32px;
  }

  .eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  .section-head h2 {
    font-size: 2.2rem;
    line-height: 1.1;
  }

  .hero {
    min-height: 95vh;
    padding-top: 48px;
    padding-bottom: 48px;
    gap: 40px;
  }

  .hero-nav-pills {
    gap: 12px;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
  }

  .hero-nav-pills a,
  .site-footer a {
    font-size: 0.82rem;
    padding: 12px 18px;
    flex: 1;
    min-width: calc(50% - 12px);
  }

  .hero-title {
    padding: 32px 0;
    text-align: center;
  }

  .hero-title h1 {
    font-size: clamp(3rem, 14vw, 4.8rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    white-space: normal;
    word-break: break-word;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .hero-tags {
    justify-content: center;
    gap: 8px;
  }

  .hero-tags span {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .hero-intro {
    max-width: 100%;
  }

  .hero-intro p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    opacity: 0.85;
  }

  .hero-actions {
    justify-content: center;
    gap: 12px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project-card {
    border-radius: 28px;
  }

  .project-visual {
    height: 260px;
  }

  .project-meta {
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .project-meta h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
  }

  .project-meta a {
    display: block;
    padding: 10px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--pill);
  }

  .about-copy {
    padding: 24px;
    border-radius: 24px;
  }

  .about-copy p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 24px;
    text-align: center;
  }

  .stat-card h3 {
    font-size: 2.4rem;
  }

  .service-row,
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 12px;
    background: var(--pill);
    border-radius: 16px;
    margin-bottom: 12px;
    border-bottom: none;
  }

  .service-row span,
  .timeline-year {
    font-size: 0.85rem;
    color: var(--muted);
    opacity: 0.8;
  }

  .service-row h3,
  .timeline-role {
    font-size: 1.1rem;
    line-height: 1.3;
  }

  .service-row p,
  .timeline-place {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted);
  }

  .marquee-section {
    padding: 32px 0;
  }

  .marquee-content {
    gap: 60px;
  }

  .tech-logo {
    height: 40px;
  }

  .contact-box {
    padding: 24px;
    border-radius: 28px;
  }

  .contact-copy h2 {
    font-size: 2rem;
    text-align: center;
  }

  .contact-text {
    font-size: 1rem;
    text-align: center;
    margin: 0 auto 24px;
  }

  .email-link {
    display: block;
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 32px;
  }

  .socials {
    justify-content: center;
    gap: 10px;
  }

  .contact-form {
    margin-top: 20px;
  }

  .site-footer {
    padding: 0 20px 40px;
    text-align: center;
    align-items: center;
  }

  .site-footer div {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 400px) {
  .hero-title h1 {
    font-size: clamp(2.4rem, 15vw, 3.8rem);
  }

  .section {
    padding: 56px 16px;
  }

  .hero-nav-pills a {
    font-size: 0.75rem;
    padding: 8px 12px;
  }

  .project-visual {
    height: 220px;
  }

  .contact-box {
    padding: 20px;
  }
}