:root {
  --bg-top: #040b12;
  --bg-mid: #0b1621;
  --bg-bottom: #122131;
  --bg-panel: #0d1a27;
  --text-main: #f4f7ef;
  --text-muted: #b8c6d2;
  --accent: #f5b700;
  --accent-soft: #ffc94d;
  --line: rgba(255, 201, 77, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 28px
    ),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bottom) 100%);
  font-family: "Manrope", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.ambient-layer {
  display: none;
}

.ambient-layer-top {
  width: 55vw;
  height: 55vw;
  top: -18vw;
  right: -12vw;
  background: radial-gradient(
    ellipse at center,
    rgba(245, 183, 0, 0.2) 0%,
    rgba(245, 183, 0, 0.1) 36%,
    rgba(245, 183, 0, 0) 78%
  );
  filter: blur(16px);
}

.ambient-layer-bottom {
  width: 60vw;
  height: 60vw;
  bottom: -28vw;
  left: -24vw;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 213, 111, 0.19) 0%,
    rgba(255, 213, 111, 0.08) 40%,
    rgba(255, 213, 111, 0) 80%
  );
  filter: blur(26px);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1080px, 92vw);
  margin: 0 auto;
  padding: 3.2rem 0 3rem;
}

.hero {
  margin-bottom: 1.8rem;
}

h1,
h2,
h3 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(2.1rem, 5.3vw, 3.6rem);
  line-height: 1.05;
}

.hero-subtitle {
  margin: 0;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.tabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.tab {
  border: 1px solid rgba(255, 213, 111, 0.18);
  color: var(--text-main);
  background: rgba(7, 17, 27, 0.84);
  padding: 0.7rem 1rem;
  border-radius: 0;
  cursor: pointer;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tab:hover {
  border-color: var(--line);
  background: rgba(14, 28, 41, 0.95);
}

.tab.active {
  color: #051a28;
  background: var(--accent-soft);
  border-color: rgba(255, 213, 111, 0.85);
  box-shadow: none;
}

.panel-stack {
  position: relative;
}

.content-box {
  border: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(13, 26, 39, 0.96), rgba(9, 19, 30, 0.96));
  padding: clamp(1.1rem, 2.6vw, 2rem);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.34);
}

.content-box h2 {
  margin: 0 0 1.15rem;
  color: var(--accent-soft);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.content-box p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 0.95rem;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
}

.about-photo-wrap {
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 213, 111, 0.28);
  background: rgba(4, 20, 33, 0.5);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.28);
}

.about-photo {
  display: block;
  width: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  background: #0b1f31;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.skill-card {
  border: 1px solid rgba(255, 213, 111, 0.24);
  border-radius: 0;
  background: rgba(4, 20, 33, 0.45);
  padding: 1rem;
}

.skill-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--text-main);
}

.skill-card p {
  margin-bottom: 0;
  font-size: 0.97rem;
}

.project-list {
  display: grid;
  gap: 1rem;
}

.project-card {
  border: 1px solid rgba(255, 213, 111, 0.25);
  border-radius: 0;
  background: rgba(4, 20, 33, 0.5);
  padding: 0.95rem;
}

.project-media {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 0;
  border: 1px solid rgba(255, 213, 111, 0.35);
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 213, 111, 0.19), transparent 34%),
    linear-gradient(120deg, rgba(4, 20, 33, 0.6), rgba(11, 31, 49, 0.6)),
    repeating-linear-gradient(
      135deg,
      rgba(190, 211, 218, 0.14) 0,
      rgba(190, 211, 218, 0.14) 9px,
      transparent 9px,
      transparent 19px
    );
  display: grid;
  place-items: center;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.media-label {
  color: rgba(244, 247, 239, 0.9);
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: clamp(0.8rem, 1.3vw, 1rem);
  letter-spacing: 0.04em;
  background: rgba(4, 20, 33, 0.58);
  border: 1px solid rgba(255, 213, 111, 0.26);
  border-radius: 0;
  padding: 0.5rem 0.8rem;
}

.project-copy h3 {
  margin: 0.85rem 0 0.42rem;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
}

.project-copy p {
  margin-bottom: 0;
}

.contact-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.contact-pill {
  color: var(--text-main);
  text-decoration: none;
  border: 1px solid rgba(255, 213, 111, 0.3);
  border-radius: 0;
  padding: 0.65rem 1rem;
  background: rgba(4, 20, 33, 0.55);
  transition: border-color 0.22s ease, background-color 0.22s ease;
}

.contact-pill:hover {
  border-color: var(--line);
  background: rgba(12, 29, 43, 0.8);
}

.reveal-text {
  min-height: 1.2em;
  position: relative;
}

.reveal-text.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.4ch;
  height: 1.05em;
  margin-left: 0.14ch;
  border-radius: 0;
  background: rgba(255, 213, 111, 0.75);
  vertical-align: -0.1em;
  animation: caret-blink 0.8s steps(1, end) infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .about-photo-wrap {
    max-width: 290px;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }

  .site-shell {
    padding-top: 2.25rem;
  }
}

@media (max-width: 560px) {
  .tab {
    width: calc(50% - 0.38rem);
    text-align: center;
  }

  .content-box {
    border-radius: 0;
    padding: 1rem;
  }

  .project-card {
    padding: 0.72rem;
  }
}

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