/* =========================================================
   Stevanus Gerald Marconus — Portfolio
   Black & white base (from the template) + one teal accent
   ========================================================= */

:root {
  --bg: #000;
  --surface: #0f0f0f;
  --surface-2: #191919;
  --line: #2a2a2a;
  --text: #fff;
  --muted: #a3a3a3;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.15);
  --radius: 12px;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

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

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: #fff;
}
::selection {
  background: var(--accent);
  color: #000;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

/* slide-in animations start off-screen; never let them widen the page */
html,
body,
main,
footer {
  overflow-x: clip;
}

a {
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  padding: 1rem 6rem;
  max-width: 1400px;
  margin: 0 auto;
}

.title {
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
}

.title::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 4px;
  background: var(--accent);
}

.subtitle {
  color: var(--muted);
  text-align: center;
  max-width: 560px;
  margin-top: -40px;
}

/* ---------- Buttons ---------- */
.btn-outline,
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s linear;
}

.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.btn-outline:hover {
  background: #fff;
  color: #000;
}
.btn-outline.wide {
  padding: 14px 24px;
}

.btn-solid {
  background: #fff;
  color: #000;
  border: 2px solid #fff;
}
.btn-solid:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  width: 100%;
  height: 72px;
  z-index: 9999;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

header.scrolled {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

/* Golden ratio logo: φ rectangle grid + Fibonacci spiral */
.phi-logo {
  width: 52px;
  height: auto;
  overflow: visible;
}

.phi-logo path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phi-logo .grid {
  stroke: #fff;
  stroke-width: 3;
}

.phi-logo .spiral {
  stroke: var(--accent);
  stroke-width: 5;
  stroke-dasharray: 260;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s ease;
}

.logo:hover .phi-logo .spiral {
  animation: draw-spiral 1.2s ease;
}

@keyframes draw-spiral {
  from {
    stroke-dashoffset: 260;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.logo-text {
  font-weight: 700;
  font-size: 20px;
}

.dot {
  color: var(--accent);
}

header nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 17px;
}

header nav a::after {
  content: "";
  display: block;
  border-bottom: 1px solid #fff;
  width: 100%;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s linear;
}

header nav a:hover::after,
header nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

header nav a.active::after {
  border-color: var(--accent);
}

header .extra-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: flex;
  border: 2px solid #fff;
  border-radius: 8px;
  overflow: hidden;
}

.lang-btn {
  cursor: pointer;
  background: transparent;
  color: #fff;
  border: none;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  padding: 9px 11px;
  transition: 0.2s linear;
}

.lang-btn.active {
  background: #fff;
  color: #000;
}

.hamburger-menu {
  cursor: pointer;
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 34px;
  line-height: 1;
}

.mobile-nav {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  min-height: min(100vh, 980px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 72px;
  position: relative;
}

/* faint dot grid — like an empty scatter plot */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#ffffff26 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 75%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 56px;
  max-width: 1180px;
  margin: 0 auto;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.hello {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--muted);
}

.prompt {
  color: var(--accent);
  margin-right: 6px;
}

/* Full name — three typefaces, one rhythm */
.hero-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.28em;
  font-size: clamp(2.4rem, 4.6vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero-name .n-first {
  font-weight: 700;
}

.hero-name .n-mid {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.18em;
  letter-spacing: 0;
  color: var(--accent);
}

.hero-name .n-last {
  flex-basis: 100%;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.5px #fff;
  background: linear-gradient(90deg, #fff 0 50%, transparent 50% 100%);
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  transition: background-position 0.8s ease;
}

.hero-name:hover .n-last {
  background-position: 0 0;
}

.hero-tagline {
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.5;
  color: #d4d4d4;
  margin-top: 6px;
}

.hero-tagline span {
  background: #fff;
  color: #000;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 6px;
}

.typing {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--muted);
  min-height: 26px;
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #fff;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.text-link i {
  font-size: 20px;
  transition: transform 0.2s;
}

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

.text-link:hover i {
  transform: translateX(4px);
}

/* ---------- Photo frame ---------- */
.hero-photo {
  position: relative;
  width: 100%;
  max-width: 380px;
  justify-self: center;
  margin: 24px 24px 24px 0;
}

.hero-photo .frame,
.hero-photo .frame-offset {
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 22px 22px; /* arch */
}

.hero-photo .frame {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 2px solid #fff;
  background: var(--surface-2);
}

.hero-photo .frame-offset {
  position: absolute;
  inset: 0;
  transform: translate(18px, 18px);
  border: 2px solid var(--accent);
  z-index: 1;
  transition: transform 0.4s ease;
}

.hero-photo:hover .frame-offset {
  transform: translate(10px, 10px);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.05);
  transition: filter 0.4s, transform 0.6s;
}

.hero-photo:hover img {
  filter: saturate(1) contrast(1.05);
  transform: scale(1.03);
}

/* computer-vision style box around the face */
.bbox {
  position: absolute;
  left: 44%;
  top: 22%;
  width: 40%;
  height: 31%;
  border: 2px solid var(--accent);
  border-radius: 4px;
  opacity: 0;
  transform: scale(1.15);
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
}

.bbox-label {
  position: absolute;
  right: -2px;
  bottom: 100%;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  background: var(--accent);
  color: #000;
  padding: 1px 6px;
  border-radius: 3px 3px 0 0;
}

.hero-photo:hover .bbox,
.hero-photo.scanned .bbox {
  opacity: 1;
  transform: scale(1);
}

.phi-bg {
  position: absolute;
  width: 78%;
  left: -26%;
  bottom: -9%;
  z-index: 0;
  overflow: visible;
  opacity: 0.55;
}

.phi-bg rect,
.phi-bg path {
  fill: none;
  stroke: #3a3a3a;
  stroke-width: 0.8;
}

.phi-bg .spiral {
  stroke: var(--accent);
  stroke-width: 1.4;
}

.photo-chip {
  position: absolute;
  z-index: 3;
  left: -18px;
  bottom: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #000;
  border: 1px solid #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.photo-chip i {
  color: var(--accent);
  font-size: 16px;
}

.typing #typed {
  color: #fff;
}

.caret {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

/* 3D push button (kept from the template) */
.push-btn {
  cursor: pointer;
  display: inline-block;
  padding: 0.1em 0.25em;
  min-width: 13em;
  height: 4.2em;
  color: #fff;
  background-color: #000;
  border: 0.08em solid #fff;
  border-radius: 0.3em;
  font-size: 12px;
  text-decoration: none;
}

.push-btn span {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  bottom: 0.4em;
  width: 100%;
  height: 2.5em;
  padding: 0 0.8em;
  white-space: nowrap;
  background-color: #000;
  border-radius: 0.2em;
  font-size: 1.5em;
  font-weight: 600;
  border: 0.08em solid #fff;
  box-shadow: 0 0.4em 0.1em 0.019em #fff;
  transition: all 0.5s;
}

.push-btn:hover span {
  box-shadow: 0 0.4em 0.1em 0.019em var(--accent);
  border-color: var(--accent);
}

.push-btn:active span {
  transform: translate(0, 0.4em);
  box-shadow: 0 0 0 0 #fff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 56px auto 0;
  width: 100%;
  max-width: 1180px;
}

.stat {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}

.stat span {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Section shell ---------- */
.about,
.skill,
.experience,
.project,
.contact {
  padding: 5rem 0;
  width: 100%;
}

.about .content,
.skill .content,
.experience .content,
.project .content,
.contact .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  width: 100%;
}

/* ---------- About ---------- */
.about-me {
  display: flex;
  gap: 48px;
  width: 100%;
  align-items: center;
}

.about .profile {
  width: 42%;
  display: flex;
  justify-content: center;
}

/* "about_me.py" code window */
.code-card {
  width: 100%;
  max-width: 460px;
  border: 2px solid #fff;
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 14px 14px 0 -2px var(--accent-dim);
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.code-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid #666;
}

.code-bar i:first-child {
  background: var(--accent);
  border-color: var(--accent);
}

.code-bar span {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.code-card pre {
  margin: 0;
  padding: 20px 18px 22px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: #e5e5e5;
}

.code-card .k {
  color: #c084fc;
}
.code-card .f {
  color: #fff;
  font-weight: 500;
}
.code-card .s {
  color: var(--accent);
}
.code-card .n {
  color: #fbbf24;
}
.code-card .c {
  color: #737373;
  font-style: italic;
}

.about .description {
  width: 58%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.name-role {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.name-role h3 {
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1.1;
}

.name-role .role {
  display: flex;
}

.name-role h4 {
  font-weight: 500;
  font-size: 1.6rem;
  padding: 2px 10px;
  background-color: #fff;
  border-radius: 8px;
  color: #000;
}

.about .description p {
  font-size: 1.1rem;
  color: #d4d4d4;
}

.about .description p b {
  color: #fff;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.facts li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
}

.facts i {
  color: var(--accent);
  font-size: 20px;
}

/* ---------- Skills ---------- */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1100px;
}

.skill-group {
  border: 2px solid #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-group h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.idx {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-right: 4px;
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.skill-box {
  padding: 10px 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  height: 96px;
  transition: all 0.2s linear;
}

.skill-box img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: grayscale(1);
  transition: filter 0.2s linear;
}

.skill-box img.invert {
  filter: grayscale(1) invert(1);
}

.skill-box span {
  font-size: 13px;
  color: var(--muted);
}

.skill-box:hover {
  border-color: #fff;
  transform: translateY(-3px);
}

.skill-box:hover img {
  filter: grayscale(0);
}

.skill-box:hover img.invert {
  filter: invert(1);
}

.skill-box:hover span {
  color: #fff;
}

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

.chips span,
.tags span {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #d4d4d4;
}

/* ---------- Experience ---------- */
.exp-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  width: 100%;
  max-width: 1150px;
}

.timeline {
  position: relative;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}

.tl-item {
  position: relative;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000;
  border: 2px solid #fff;
}

.tl-item:first-child::before {
  background: var(--accent);
  border-color: var(--accent);
}

.tl-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

.tl-item h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2px;
}

.tl-org {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.tl-item ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tl-item li {
  position: relative;
  padding-left: 18px;
  color: #d4d4d4;
}

.tl-item li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.label {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.edu-card,
.awards {
  border: 2px solid #fff;
  border-radius: 16px;
  padding: 20px;
}

.edu-card h3 {
  font-size: 1.3rem;
}

.edu-card p {
  color: #d4d4d4;
}

.edu-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.gpa {
  font-family: var(--mono);
  color: #000;
  background: var(--accent);
  padding: 1px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.awards ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.awards li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  font-size: 15px;
  color: #d4d4d4;
  line-height: 1.45;
}

.awards b {
  color: #fff;
}

.yr {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  padding-top: 2px;
}

.yr i {
  font-size: 18px;
}

/* ---------- Achievement highlight (DAC 2025) ---------- */
.highlight {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  width: 100%;
  max-width: 1150px;
  border: 2px solid #fff;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}

.hl-photo {
  position: relative;
  margin: 0;
  min-height: 100%;
  background: var(--surface-2);
}

.hl-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  filter: saturate(0.9);
  transition: filter 0.4s;
}

.highlight:hover .hl-photo img {
  filter: saturate(1.05);
}

.hl-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.hl-badge i {
  font-size: 18px;
}

.hl-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-left: 2px solid #fff;
}

.hl-body .label {
  color: var(--accent);
  margin-bottom: 0;
}

.hl-body h3 {
  font-size: 1.55rem;
  line-height: 1.25;
}

.hl-body > p {
  color: #d4d4d4;
  font-size: 15.5px;
}

.hl-body b {
  color: #fff;
}

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

.hl-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d4d4d4;
}

.hl-meta i {
  color: var(--accent);
}

.hl-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.hl-stats div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #000;
}

.hl-stats strong {
  display: block;
  font-size: 1.2rem;
}

.hl-stats span {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.35;
  display: block;
}

@media screen and (max-width: 1024px) {
  .highlight {
    grid-template-columns: 1fr;
  }

  .hl-body {
    border-left: none;
    border-top: 2px solid #fff;
  }
}

@media screen and (max-width: 560px) {
  .hl-body {
    padding: 20px;
  }

  .hl-body h3 {
    font-size: 1.3rem;
  }

  .hl-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hl-stats div:first-child {
    grid-column: 1 / -1;
  }

  .hl-badge {
    font-size: 12px;
    left: 12px;
    bottom: 12px;
  }
}

/* ---------- Projects ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1250px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 2px solid #fff;
  border-radius: 14px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 -2px var(--accent);
}

.visual {
  position: relative;
  aspect-ratio: 2 / 1;
  border-radius: 10px;
  background: var(--surface-2);
  overflow: hidden;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: -1px -1px;
}

.visual svg {
  width: 100%;
  height: 100%;
  padding: 8px;
}

.visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* mini-chart marks */
.visual .bars rect {
  fill: #444;
}
.visual .hot {
  fill: var(--accent) !important;
}
.visual .cut {
  stroke: #fff;
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}
.visual .lbl {
  fill: #fff;
  font-family: var(--mono);
  font-size: 10px;
}
.visual .line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.visual .line.thin {
  stroke: #666;
  stroke-width: 2;
}
.visual .line.muted {
  stroke: #666;
  stroke-width: 2;
}
.visual .line.dashed {
  stroke-dasharray: 6 5;
}
.visual .band {
  fill: var(--accent-dim);
}
.visual .pt {
  fill: #fff;
}
.visual .node {
  fill: #000;
  stroke: #fff;
  stroke-width: 2;
}
.visual .node.hot {
  stroke: var(--accent);
}
.visual .track {
  fill: none;
  stroke: #333;
  stroke-width: 12;
  stroke-linecap: round;
}
.visual .arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 12;
  stroke-linecap: round;
}
.visual .needle {
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
}
.visual .pixels rect {
  transition: fill 0.6s;
}

.card .description {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding-top: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card h3 {
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
}

.card .description > p {
  font-size: 15.5px;
  color: #d4d4d4;
}

.card .metric {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13px !important;
  color: var(--accent) !important;
}

.card .action {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.card .action a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 2px solid #fff;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: 0.3s linear;
}

.card .action a:hover {
  background: #fff;
  color: #000;
}

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  width: 100%;
  max-width: 1050px;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.c-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  text-decoration: none;
  transition: 0.25s;
  min-width: 0;
}

.c-card i {
  font-size: 26px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-2);
  flex-shrink: 0;
}

.c-card div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.c-card span {
  font-size: 13px;
  color: var(--muted);
}

.c-card b {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.c-card:hover {
  border-color: #fff;
}

.c-card:hover i {
  background: var(--accent);
  color: #000;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 4px solid #fff;
  border-radius: 20px;
}

.contact-form .input {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-form .input .full {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 12px;
  background: transparent;
  border: 3px solid #fff;
  border-radius: 8px;
  color: #fff;
}

.contact-form textarea {
  resize: none;
  height: 220px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form .invalid {
  border-color: #f87171;
}

.form-note {
  min-height: 1.2em;
  font-size: 14px;
  color: var(--muted);
}

.form-note.error {
  color: #f87171;
}

.contact-form button {
  align-self: flex-start;
  font-size: 16px;
  padding: 12px 20px;
}

/* ---------- Footer ---------- */
footer {
  width: 100%;
  border-top: 2px solid #fff;
}

footer .container {
  padding: 4rem 6rem 2rem;
  display: flex;
  gap: 4rem;
}

footer .profile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 30%;
}

footer .profile p {
  color: var(--muted);
}

.social-media-container {
  display: flex;
  gap: 10px;
}

.social-media {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--surface-2);
  font-size: 20px;
  text-decoration: none;
  transition: transform 1s linear, background 0.3s;
}

.social-media:hover {
  transform: rotateY(360deg);
  background: var(--accent);
  color: #000;
}

.link-container {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.link-container h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
}

.link-container ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-container ul li a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.link-container ul li a::after {
  content: "";
  display: block;
  border-bottom: 2px solid #fff;
  width: 40%;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s linear;
  margin-top: 2px;
}

.link-container ul li a:hover {
  color: #fff;
}

.link-container ul li a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.copyright {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 1.5rem;
  border-top: 1px solid var(--line);
}

/* ---------- Animations ---------- */
@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .caret {
    animation: none;
  }
  .hero-photo .bbox {
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 1280px) {
  .container {
    padding: 1rem 3rem;
  }
  footer .container {
    padding: 3rem 3rem 2rem;
  }
  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 1024px) {
  header nav,
  header .extra-nav {
    display: none;
  }

  .hamburger-menu {
    display: block;
  }

  .mobile-nav {
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    inset: 0;
    transform: translateY(-100%);
    height: 100vh;
    height: 100dvh;
    background-color: #000;
    z-index: 999;
    transition: transform 0.25s ease;
  }

  .mobile-nav.show {
    transform: translateY(0);
  }

  .mobile-nav .close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
  }

  .mobile-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .mobile-nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 32px;
  }

  .mobile-nav .nav-link::after {
    content: "";
    display: block;
    border-bottom: 1px solid var(--accent);
    width: 0%;
    transition: 0.3s linear;
  }

  .mobile-nav li:hover .nav-link::after {
    width: 100%;
  }

  .mobile-extra {
    display: flex;
    gap: 12px;
  }

  .about-me {
    flex-direction: column;
  }

  .about .profile,
  .about .description {
    width: 100%;
  }

  .code-card {
    max-width: 520px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    justify-items: center;
  }

  .hero-photo {
    order: -1;
    max-width: 300px;
    margin: 8px 18px 18px 0;
  }

  .hero-text {
    align-items: center;
    text-align: center;
  }

  .hero-name {
    justify-content: center;
  }

  .exp-grid,
  .contact-wrap {
    grid-template-columns: 1fr;
  }

  footer .container {
    flex-direction: column;
    gap: 2.5rem;
  }

  footer .profile {
    width: 100%;
    max-width: 420px;
  }
}

@media screen and (max-width: 768px) {
  .container {
    padding: 1rem 1.25rem;
  }

  header {
    padding: 0 1.25rem;
  }

  .title {
    font-size: 2.3rem;
  }

  .subtitle {
    margin-top: -36px;
  }

  .hero-tagline {
    font-size: 1.15rem;
  }

  .hero-photo {
    max-width: 250px;
  }

  .photo-chip {
    left: -10px;
    font-size: 12px;
  }

  .code-card pre {
    font-size: 12px;
    padding: 16px 14px 18px;
  }

  .typing {
    font-size: 15px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 32px;
  }

  .about,
  .skill,
  .experience,
  .project,
  .contact {
    padding: 3.5rem 0;
  }

  .about .content,
  .skill .content,
  .experience .content,
  .project .content,
  .contact .content {
    gap: 48px;
  }

  .name-role h3 {
    font-size: 2rem;
  }

  .name-role h4 {
    font-size: 1.3rem;
  }

  .about .description p {
    font-size: 1rem;
  }

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

  footer .container {
    padding: 2.5rem 1.25rem 1.5rem;
  }
}

@media screen and (max-width: 560px) {
  .facts {
    grid-template-columns: 1fr;
  }

  .contact-form {
    border-width: 3px;
    padding: 16px;
  }

  .contact-form .input {
    grid-template-columns: 1fr;
  }

  .c-card b {
    font-size: 14px;
  }

  .link-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-nav ul li a {
    font-size: 28px;
  }
}
