@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap");

:root {
  --bg: #0b0b0c;
  --bg-elev: #141416;
  --bg-card: #1a1a1e;
  --line: #2a2a30;
  --text: #f4f0ea;
  --muted: #9a948c;
  --orange: #ff6a1a;
  --orange-2: #ff8a3d;
  --orange-dim: rgba(255, 106, 26, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --nav-h: 72px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f3ee;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --line: #d9d1c8;
  --text: #191614;
  --muted: #6f665f;
  --orange: #e85d0b;
  --orange-2: #c94d00;
  --orange-dim: rgba(232, 93, 11, 0.11);
  --shadow: 0 22px 55px rgba(55, 42, 31, 0.12);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(255, 106, 26, 0.16), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(255, 138, 61, 0.08), transparent 50%);
  z-index: -1;
}

html[data-theme="light"] body::before,
html[data-theme="light"] .hex-field {
  display: none;
}

.hex-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-hex {
  --hex-size: 64px;
  position: absolute;
  left: var(--hex-left);
  top: var(--hex-top);
  width: var(--hex-size);
  aspect-ratio: 1;
  opacity: 0.42;
  background: linear-gradient(145deg, rgba(255, 138, 61, 0.28), rgba(255, 106, 26, 0.06));
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0 50%);
  filter: drop-shadow(0 0 14px rgba(255, 106, 26, 0.6));
  animation: hex-float 18s ease-in-out var(--hex-delay) infinite alternate;
}

.floating-hex::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--bg);
  clip-path: inherit;
}

.hero,
.section,
footer {
  position: relative;
  z-index: 1;
}

@keyframes hex-float {
  0% {
    transform: translate3d(-12px, 16px, 0) rotate(0deg) scale(0.94);
  }
  50% {
    transform: translate3d(28px, -34px, 0) rotate(24deg) scale(1.08);
  }
  100% {
    transform: translate3d(-20px, -72px, 0) rotate(52deg) scale(0.98);
  }
}

img {
  max-width: 100%;
  display: block;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6vw;
  backdrop-filter: blur(16px);
  background: rgba(11, 11, 12, 0.78);
  border-bottom: 1px solid var(--line);
}

html[data-theme="light"] .nav {
  background: rgba(246, 243, 238, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Syne, sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.brand-logo {
  width: 42px;
  height: 46px;
  object-fit: contain;
  transition: filter 180ms ease, transform 180ms ease;
}

.brand:hover .brand-logo,
.brand:focus-visible .brand-logo {
  filter: drop-shadow(0 0 8px rgba(255, 106, 26, 0.55));
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  font-size: 0.92rem;
}

.nav-links a:hover {
  color: var(--orange);
}

.theme-toggle {
  position: relative;
  flex: 0 0 auto;
  min-width: 64px;
  width: 64px;
  height: 34px;
  display: inline-block;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(90deg, #1b1b20, #34343c);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.38);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--orange);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.theme-toggle-knob {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #140800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
  transform: translateX(0);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background 180ms ease;
}

html[data-theme="light"] .theme-toggle {
  background: linear-gradient(90deg, #e7e1d9, #ffffff);
  box-shadow: inset 0 1px 4px rgba(55, 42, 31, 0.16);
}

html[data-theme="light"] .theme-toggle-knob {
  transform: translateX(30px);
}

.theme-toggle-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.theme-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-cta {
  background: var(--orange);
  color: #140800 !important;
  font-weight: 650;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}

.hero {
  padding: 7rem 6vw 4rem;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 3rem;
  align-items: end;
}

.kicker {
  color: var(--orange);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.mainframe-text,
.hero-meta dt,
.tag,
.job time {
  font-family: "Share Tech Mono", "IBM Plex Mono", monospace;
  color: var(--orange);
}

h1,
h2,
h3 {
  font-family: Syne, sans-serif;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.lede {
  color: var(--muted);
  max-width: 52ch;
  font-size: 1.08rem;
  margin: 1.4rem 0 0;
}

.hero-meta {
  display: grid;
  gap: 0.9rem;
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-meta dt {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-meta dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

.section {
  padding: 4.5rem 6vw;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.section-head p {
  color: var(--muted);
  max-width: 42ch;
  margin: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

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

.tag {
  display: inline-block;
  color: var(--orange);
  background: var(--orange-dim);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.carousel-wrap {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.carousel {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: drift 36s linear infinite;
}

.carousel:hover {
  animation-play-state: paused;
}

.project {
  width: min(78vw, 420px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.project h3 {
  font-size: 1.35rem;
  margin: 0.4rem 0 0.6rem;
}

.project p {
  color: var(--muted);
  margin: 0 0 1rem;
  flex: 1;
}

.project a {
  color: var(--orange);
  font-weight: 600;
}

.storefront-showcase {
  padding-top: 1rem;
}

.live-preview {
  position: relative;
  display: block;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255, 106, 26, 0.7);
  border-radius: var(--radius);
  background: #101012;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), 0 0 32px rgba(255, 106, 26, 0.14);
}

.live-preview iframe {
  width: 100%;
  height: 520px;
  border: 0;
  pointer-events: none;
  background: #fff;
}

.live-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 68%, rgba(8, 8, 9, 0.82));
  transition: background 180ms ease;
}

.live-preview:hover::after,
.live-preview:focus-visible::after {
  background: linear-gradient(180deg, rgba(255, 106, 26, 0.05), rgba(8, 8, 9, 0.74));
}

.live-preview-badge,
.live-preview-action {
  position: absolute;
  z-index: 2;
  font-family: "Share Tech Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.live-preview-badge {
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--orange);
  color: #140800;
  font-weight: 700;
}

.live-preview-action {
  right: 1.2rem;
  bottom: 1rem;
  color: var(--orange-2);
  font-weight: 700;
}

@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.excel-shell {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #1e1e1e;
}

.excel-bar {
  background: #217346;
  color: #fff;
  font-size: 0.82rem;
  padding: 0.55rem 0.9rem;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.excel-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.excel-grid th,
.excel-grid td {
  border: 1px solid #333;
  padding: 0.45rem 0.55rem;
  text-align: right;
}

.excel-grid th:first-child,
.excel-grid td:first-child {
  text-align: left;
  color: var(--muted);
}

.excel-grid thead th {
  background: #252525;
  text-align: center;
}

.excel-grid tbody tr:nth-child(even) {
  background: #191919;
}

.thought {
  margin-top: 1rem;
  color: var(--muted);
}

.thought strong {
  color: var(--text);
}

.embed-frame {
  width: 100%;
  min-height: 152px;
  border: 0;
  border-radius: 12px;
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.ig-tile {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 106, 26, 0.25), transparent 50%),
    #222;
  display: grid;
  place-items: end start;
  padding: 0.8rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.job {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.job time {
  color: var(--orange);
  font-size: 0.85rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills span {
  border: 1px solid var(--line);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.88rem;
}

.form {
  display: grid;
  gap: 0.9rem;
  max-width: 640px;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.btn {
  border: 0;
  cursor: pointer;
  background: var(--orange);
  color: #140800;
  font-weight: 700;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  width: fit-content;
  font: inherit;
}

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

.cert {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.certificate-gallery {
  padding-top: 1.5rem;
}

.certificate-gallery-list {
  display: grid;
  gap: 1.5rem;
}

.certificate-gallery-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(420px, 1.14fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1.4rem, 2.6vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(26, 26, 30, 0.94);
  box-shadow: var(--shadow);
}

html[data-theme="light"] .certificate-gallery-card {
  background: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] .excel-shell {
  background: #ffffff;
}

html[data-theme="light"] .excel-grid th,
html[data-theme="light"] .excel-grid td {
  border-color: #ddd4ca;
}

html[data-theme="light"] .excel-grid thead th {
  background: #eee9e2;
}

html[data-theme="light"] .excel-grid tbody tr:nth-child(even) {
  background: #faf7f3;
}

html[data-theme="light"] .ig-tile {
  background:
    linear-gradient(145deg, rgba(232, 93, 11, 0.16), transparent 50%),
    #ffffff;
}

.certificate-copy {
  align-self: start;
  padding-top: 0.25rem;
}

.certificate-source {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 106, 26, 0.16);
  color: var(--orange);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.certificate-copy h3 {
  max-width: 24ch;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.certificate-copy p {
  margin: 0.8rem 0 1.2rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.certificate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  background: var(--orange);
  color: #140800;
  font-weight: 700;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.certificate-button:hover,
.certificate-button:focus-visible {
  background: var(--orange-2);
  box-shadow: 0 0 22px rgba(255, 106, 26, 0.35);
  transform: translateY(-2px);
}

.certificate-document {
  display: block;
  overflow: hidden;
  padding: clamp(0.45rem, 0.9vw, 0.75rem);
  border: 2px solid #c9c9cb;
  border-radius: 16px;
  background: #d6d6d8;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.certificate-document:hover,
.certificate-document:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 106, 26, 0.22);
  transform: translateY(-3px);
}

.certificate-document img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
}

footer {
  padding: 2.5rem 6vw 3.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 860px) {
  .hero,
  .grid-2,
  .job {
    grid-template-columns: 1fr;
  }

  .nav {
    height: auto;
    min-height: var(--nav-h);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.65rem 4vw 0.55rem;
  }

  .nav-links {
    width: 100%;
    gap: 0.8rem;
    font-size: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .theme-toggle {
    min-width: 64px;
    width: 64px;
    padding: 3px;
  }

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

  .live-preview,
  .live-preview iframe {
    min-height: 360px;
    height: 360px;
  }

  .certificate-gallery-card {
    grid-template-columns: 1fr;
  }

  .certificate-copy {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-hex,
  .carousel {
    animation: none;
  }
}
