/* FONT */
* {
  font-family: "Chiron GoRound TC", sans-serif !important;
}

/* TOKENS - Cozy Palette Theme */
:root {
  --c-body-bg: #FCF6EB;
  --c-bg: #FFFBF2;
  --c-surface: #ffffff;
  --c-border: #4A3931;
  --c-accent: #F8A1B1;
  --c-accent-hover: #E88AA0;
  --c-ink: #4A3931;
  --c-muted: #8E7768;
  --c-ticker: #EFE3D3;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --game-shadow: 0 8px 0 var(--c-border);
}

/* BASE */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-weight: 500;
  background-color: var(--c-body-bg);
  color: var(--c-ink);
  overflow-x: hidden;
}

/* MAIN CONTENT */
#main-content {
  background-color: var(--c-bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(248, 161, 177, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 85% 100%, rgba(248, 161, 177, 0.1) 0%, transparent 60%);
  border-bottom-left-radius: 60px;
  border-bottom-right-radius: 60px;
  border-bottom: 6px solid var(--c-border);
  position: relative;
  z-index: 10;
  box-shadow: 0 20px 40px rgba(74, 57, 49, 0.08);
  padding-top: 5rem;
  min-height: 100vh;
  overflow: hidden;
}

/* GRID BACKGROUND */
#main-content::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Behind the cards and content */
  pointer-events: none;
  background-size: 45px 45px;
  background-image:
    linear-gradient(to right, rgba(74, 57, 49, 0.181) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(74, 57, 49, 0.181) 1px, transparent 1px);
  /* Fades out transparent at the very top */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 30vh);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 30vh);
}

/* Texture Overlay */
#main-content::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23g)' opacity='0.05'/%3E%3C/svg%3E");
}

/* TYPOGRAPHY */
.display,
h1.hero-name,
.hero-badge {
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.display {
  font-weight: 600;
}

h1.hero-name {
  font-weight: 700;
  color: var(--c-border);
}

.hero-badge {
  font-weight: 700;
}

/* NAV */
nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 0.6rem 0.75rem 0.6rem 1.35rem;
  background: rgba(255, 251, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 4px solid var(--c-border);
  border-radius: 999px;
  box-shadow: var(--game-shadow);
  animation: navIn 0.95s 0.05s var(--ease-expo) both;
}

@keyframes navIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-18px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-border);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.logo .br {
  color: var(--c-accent);
  font-weight: 600;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

nav ul li a {
  display: block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-muted);
  text-decoration: none;
  transition: all 0.2s;
}

nav ul li a:hover {
  color: var(--c-border);
  background: rgba(248, 161, 177, 0.15);
}

nav ul li a.is-active {
  color: var(--c-border);
  background: rgba(248, 161, 177, 0.3);
}

/* HAMBURGER */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: var(--c-surface);
  border: 3px solid var(--c-border);
  border-radius: 12px;
  cursor: pointer;
  padding: 6px;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: 0 4px 0 var(--c-border);
}

.nav-hamburger:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--c-border);
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--c-border);
  border-radius: 3px;
  transition: all 0.3s var(--ease-expo);
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* BUTTONS */
.btn-primary,
.send-btn,
.nav-resume {
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: var(--c-accent) !important;
  border: 4px solid var(--c-border) !important;
  color: var(--c-border) !important;
  font-weight: 700 !important;
  border-radius: 999px;
  box-shadow: var(--game-shadow) !important;
  transition: transform 0.1s, box-shadow 0.1s, background 0.2s !important;
}

.btn-primary:hover,
.send-btn:hover,
.nav-resume:hover {
  background: var(--c-accent-hover) !important;
}

.btn-primary:active,
.send-btn:active {
  transform: translateY(8px) !important;
  box-shadow: 0 0 0 var(--c-border) !important;
}

.nav-resume {
  box-shadow: 0 4px 0 var(--c-border) !important;
}

.nav-resume:active {
  transform: translateY(4px) !important;
  box-shadow: 0 0 0 var(--c-border) !important;
}

.btn-ghost {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-muted);
  text-decoration: none;
  border-bottom: 3px dashed transparent;
  transition: all 0.2s;
}

.btn-ghost:hover {
  color: var(--c-border);
  border-bottom-color: var(--c-border);
}

/* STICKY SECTIONS */
section[id] {
  position: sticky;
  background: var(--c-surface);
  border-radius: 40px;
  border: 4px solid var(--c-border);
  box-shadow: 0 16px 0 rgba(74, 57, 49, 0.08);
  margin: 0 auto 25vh auto;
  max-width: 1200px;
  width: calc(100% - 2rem);
  min-height: 80vh;
  overflow: hidden;
  scroll-margin-top: 7rem;
}

#home {
  margin-top: 2rem;
  margin-bottom: 2rem !important;
  z-index: 10;
  border: none;
  background: transparent;
  box-shadow: none;
  position: relative;
  top: 0 !important;
  padding-bottom: 0;
}

#midterm {
  z-index: 20;
}

#final {
  z-index: 30;
}

#contact {
  z-index: 40;
  margin-bottom: 5rem;
}

.section-inner {
  padding: 5rem 3rem;
}

.section {
  border-top: 2px dashed var(--c-border);
}

/* HERO */
#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 4.5rem 2rem 0 2rem;
  scroll-margin-top: 3.5rem;
  overflow: visible;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-border);
  background: var(--c-surface);
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 3px solid var(--c-border);
  box-shadow: 0 4px 0 var(--c-border);
  margin-bottom: 2rem;
  animation: fadeUp 1s 0.2s var(--ease-expo) both;
}

/* TYPING ANIMATION (JS) */
h1.hero-name.typing {
  font-size: clamp(3.5rem, 6vw, 7rem);
  color: var(--c-border);
  margin-bottom: 1.5rem;
  display: inline-block;
  white-space: nowrap;
  border-right: 0.10em solid var(--c-accent);
  min-height: 1.2em;
  animation: blink-caret 0.75s step-end infinite;
}

h1.hero-name em {
  font-style: normal;
  color: var(--c-accent);
}

@keyframes blink-caret {
  50% {
    border-color: transparent;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-school {
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  font-weight: 700;
  color: var(--c-muted);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: fadeUp 1s 0.4s var(--ease-expo) both;
}

.hero-sub {
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  font-weight: 500;
  color: var(--c-muted);
  line-height: 1.6;
  max-width: 550px;
  margin-bottom: 3rem;
  animation: fadeUp 1s 0.46s var(--ease-expo) both;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  animation: fadeUp 1s 0.58s var(--ease-expo) both;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 2.1rem;
  text-decoration: none;
  font-size: 1rem;
}

/* TICKER */
.ticker-wrap {
  overflow: hidden;
  padding: 1.5rem 0;
  position: relative;
  width: 100%;
  border-top: 2px dashed var(--c-border);
  border-bottom: 2px dashed var(--c-border);
  animation: fadeUp 1s 0.65s var(--ease-expo) both;
}

.ticker-wrap::before,
.ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: marquee 35s linear infinite;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.tick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.2s;
  cursor: default;
  flex: 0 0 80px;
}

.tick:hover {
  transform: scale(1.05);
}

.tick-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface);
  border: 4px solid var(--c-border);
  border-radius: 20px;
  box-shadow: 0 0 0 var(--c-border);
}

.tick-icon img {
  width: 50%;
  height: 50%;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.tick-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-ink);
  white-space: nowrap;
  text-align: center;
}

/* CODE WINDOW */
.preview-wrap {
  width: 100%;
  max-width: 900px;
  margin-top: 4rem;
  animation: fadeUp 1.1s 0.8s var(--ease-expo) both;
}

.code-window,
.mac-window {
  background: var(--c-bg);
  border: 4px solid var(--c-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--game-shadow);
  text-align: left;
  position: relative;
  z-index: 10;
}

.dark-chrome,
.mac-chrome {
  background: var(--c-body-bg);
  border-bottom: 4px solid var(--c-border);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  position: relative;
}

.traffic-lights {
  display: flex;
  gap: 10px;
}

.dark-chrome .dot,
.mac-chrome .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--c-border);
}

.dr {
  background: var(--c-accent);
}

.dy {
  background: #fddb83;
}

.dg {
  background: #a8e6cf;
}

.file-name {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--c-border);
  font-size: 0.9rem;
  font-weight: 700;
}

.code-content {
  padding: 2rem;
  overflow-x: auto;
}

.code-content pre {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-ink);
  font-family: 'Courier New', Courier, monospace !important;
  font-weight: 600;
}


.terminal-window {
  margin-top: 2rem;
  margin-bottom: 2rem;
  background: #191919;
}

.terminal-window .mac-chrome {
  background: #2d2d2d;
  border-bottom: 4px solid var(--c-border);
}

.terminal-window .file-name {
  color: #ddd;
}

.terminal-content pre {
  color: #a6e22e !important;
  font-weight: 500;
}

.code-content .kw {
  color: #d97387;
}

.code-content .cl {
  color: #d08c60;
}

.code-content .fn {
  color: #6d9dc5;
}

.code-content .st {
  color: #7ea172;
}

.code-content .cm {
  color: #8e7768;
  font-style: italic;
}

/* TEXT ROLES TICKER */
.roles-ticker-wrap {
  overflow: hidden;
  width: 100%;
  padding: 1rem 0;
  margin-top: 0;
  margin-bottom: 3rem;
  background: transparent;
  position: relative;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.roles-ticker-wrap::before,
.roles-ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.roles-ticker-wrap::before {
  background: linear-gradient(to right, var(--c-bg), transparent);
  left: 0;
}

.roles-ticker-wrap::after {
  background: linear-gradient(to left, var(--c-bg), transparent);
  right: 0;
}

.roles-ticker-track {
  display: flex;
  width: max-content;
  animation: rolesMarquee 35s linear infinite;
}

.roles-ticker-track.reverse {
  animation: rolesMarqueeReverse 36s linear infinite;
  /* Slightly faster for a cool parallax effect */
}

.role-item {
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 800;
  color: var(--c-muted);
  letter-spacing: 0.1em;
  padding-right: 0.5rem;
}

@keyframes rolesMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes rolesMarqueeReverse {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

/* PROJECT CARDS */
.section-heading {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  color: var(--c-border);
  margin-bottom: 1rem;
  font-weight: 700;
}

.section-desc {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-muted);
  line-height: 1.8;
  max-width: 600px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 2rem;
  margin-top: 3.5rem;
  border-top: 3px dashed var(--c-border);
  padding-top: 3.5rem;
}

.proj-card {
  background: var(--c-bg);
  border: 4px solid var(--c-border);
  border-radius: 32px;
  padding: 2.5rem 2.2rem 2.2rem;
  position: relative;
  overflow: visible;
  box-shadow: var(--game-shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.proj-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 0 var(--c-border);
}

.card-tag {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-surface);
  background: var(--c-border);
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  box-shadow: 0 4px 0 rgba(74, 57, 49, 0.2);
  white-space: nowrap;
  z-index: 10;
}

.card-title {
  font-size: 1.6rem;
  color: var(--c-border);
  margin-bottom: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.card-body-text {
  font-size: 0.95rem;
  color: var(--c-ink);
  line-height: 1.6;
  font-weight: 600;
  text-align: center;
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-border);
  text-decoration: none;
  background: var(--c-surface);
  padding: 0.8rem 1.2rem;
  border-radius: 16px;
  border: 3px solid var(--c-border);
  box-shadow: 0 4px 0 var(--c-border);
  transition: all 0.2s;
}

.card-link:hover {
  background: var(--c-accent);
  color: var(--c-border);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--c-border);
}

.card-link:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--c-border);
}

/* QA BOX */
.qa-box {
  background: var(--c-surface);
  border: 3px solid var(--c-border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 0 var(--c-border);
}

.qa-box>p:first-child {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 3px dashed var(--c-border);
}

.qa-box>*:last-child {
  margin-bottom: 0;
}

/* DROPDOWN */
details.custom-dropdown {
  background: var(--c-body-bg);
  border: 3px solid var(--c-border);
  border-radius: 16px;
  margin-top: 1.5rem;
  overflow: hidden;
  transition: all 0.3s;
}

details.custom-dropdown summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  /* Hide default arrow */
  color: var(--c-border);
  font-size: 0.95rem;
  transition: background 0.2s;
}

details.custom-dropdown summary:hover {
  background: rgba(248, 161, 177, 0.1);
}

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

details.custom-dropdown summary::after {
  content: '↓';
  font-size: 1.1rem;
  transition: transform 0.3s var(--ease-expo);
}

details.custom-dropdown[open] summary::after {
  transform: rotate(180deg);
}

details.custom-dropdown[open] summary {
  border-bottom: 3px dashed var(--c-border);
}

details.custom-dropdown[open] {
  background: var(--c-surface);
  box-shadow: 0 4px 0 var(--c-border);
}

.dropdown-content {
  padding: 0.5rem 1rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dropdown-content a {
  text-decoration: none;
  color: var(--c-ink);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--c-body-bg);
  border: 2px solid transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.dropdown-content a .arr {
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.2s;
  color: var(--c-accent);
  font-size: 1.1rem;
}

.dropdown-content a:hover {
  background: rgba(248, 161, 177, 0.15);
  border-color: var(--c-accent);
  color: var(--c-border);
  transform: translateX(4px);
}

.dropdown-content a:hover .arr {
  opacity: 1;
  transform: translateX(0);
}

/* ===================== ACTIVITY PAGE ===================== */
.article-container {
  max-width: 900px;
  margin: 6rem auto 8rem auto;
  background: var(--c-bg);
  border: 4px solid var(--c-border);
  border-radius: 40px;
  padding: 4rem 5rem;
  box-shadow: 0 16px 0 rgba(74, 57, 49, 0.08);
  animation: fadeUp 0.8s var(--ease-expo) both;
  position: relative;
  z-index: 20;
}

.back-btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-muted);
  text-decoration: none;
  margin-bottom: 3rem;
  border-bottom: 3px dashed transparent;
  transition: all 0.2s;
}

.back-btn:hover {
  color: var(--c-border);
  border-bottom-color: var(--c-border);
}

.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 3px dashed var(--c-border);
}

.article-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-surface);
  background: var(--c-border);
  border-radius: 999px;
  padding: 0.4rem 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 0 rgba(74, 57, 49, 0.2);
}

.article-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--c-border);
  margin-bottom: 1rem;
}

.article-meta {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-muted);
}

.prose h3 {
  font-size: 1.8rem;
  color: var(--c-border);
  margin: 3rem 0 1.5rem 0;
}

.prose p,
.prose ul,
.prose ol {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--c-ink);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.prose ul,
.prose ol {
  padding-left: 2rem;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--c-border);
  border: 3px solid var(--c-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: var(--c-ink);
  background: var(--c-bg);
  min-width: 600px;
}

.data-table th,
.data-table td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 2px solid rgba(74, 57, 49, 0.1);
  font-weight: 600;
}

.data-table th {
  background: var(--c-ticker);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--c-border);
  border-bottom: 3px solid var(--c-border);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* PDF Attachments */
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.pdf-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--c-surface);
  border: 4px solid var(--c-border);
  border-radius: 24px;
  padding: 1.5rem;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--c-border);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.pdf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 var(--c-border);
  background: var(--c-body-bg);
}

.pdf-card:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 var(--c-border);
}

.pdf-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: var(--c-body-bg);
  border: 3px solid var(--c-border);
  border-radius: 16px;
}

.pdf-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  overflow: hidden;
}

.pdf-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-muted);
}

.pdf-action {
  color: var(--c-border);
  font-weight: 800;
  font-size: 1.2rem;
}


/* CONTACT FORM */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: var(--c-bg);
  padding: 2.5rem;
  border: 4px solid var(--c-border);
  border-radius: 32px;
  box-shadow: var(--game-shadow);
}

.fg {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fg label {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--c-border);
}

.fg input,
.fg textarea {
  width: 100%;
  display: block;
  background: var(--c-surface);
  border: 4px solid var(--c-border);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  font-size: 1rem;
  color: var(--c-ink);
  outline: none;
  resize: none;
  font-weight: 600;
  transition: background 0.2s;
  box-shadow: inset 0 3px 0 rgba(74, 57, 49, 0.05);
}

.fg input:focus,
.fg textarea:focus {
  background: #fff;
  border-color: var(--c-accent);
}

.send-btn {
  align-self: flex-start;
  padding: 1rem 2.5rem;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

/* FOOTER */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  background: var(--c-border);
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 3px dashed rgba(255, 255, 255, 0.15);
  padding-top: 2rem;
}

.footer-copyright {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-body-bg);
}

/* SOCIAL CIRCLES */
.social-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-body-bg);
  border: 4px solid var(--c-body-bg);
  border-radius: 16px;
  width: 54px;
  height: 54px;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3);
}

.social-circle img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: invert(0.8) sepia(1) saturate(5) hue-rotate(330deg);
}

.social-circle:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.3);
}

.social-circle:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
}

/* SCROLL REVEAL */
.sr {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.sr.in {
  opacity: 1;
  transform: translateY(0);
}

.sr-d1 {
  transition-delay: 0.05s;
}

.sr-d2 {
  transition-delay: 0.1s;
}

.sr-d3 {
  transition-delay: 0.15s;
}

.sr-d4 {
  transition-delay: 0.2s;
}

.sr-d5 {
  transition-delay: 0.25s;
}

/* ===================== GO TO TOP ===================== */
.go-top-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 55px;
  height: 55px;
  background: var(--c-surface);
  color: var(--c-border);
  border: 4px solid var(--c-border);
  border-radius: 18px;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 6px 0 var(--c-border);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s var(--ease-expo);
  text-decoration: none;
}

.go-top-float.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.go-top-float.visible:hover {
  background: var(--c-accent);
  color: var(--c-border);
  transform: translateY(-4px);
  box-shadow: 0 10px 0 var(--c-border);
}

.go-top-float.visible:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 var(--c-border);
}

/* ===================== RESPONSIVE (IN MOBILE) ===================== */
@media (max-width: 768px) {
  nav {
    top: 1rem;
    width: calc(100% - 2rem);
    gap: 0;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    border-radius: 20px;
    border-width: 3px;
    box-shadow: 0 4px 0 var(--c-border);
  }

  .logo {
    font-size: 0.9rem;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    align-items: center;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    transition: all 0.35s ease-in-out;
    margin: 0;
  }

  nav ul.open {
    max-height: 400px;
    opacity: 1;
    padding: 1rem 0 0.5rem;
    gap: 0.8rem;
  }

  nav ul li a {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
  }

  .nav-hamburger {
    display: flex;
    width: 38px;
    height: 38px;
    padding: 8px;
    border-width: 2px;
    box-shadow: 0 3px 0 var(--c-border);
  }

  .nav-resume {
    box-shadow: 0 3px 0 var(--c-border) !important;
    margin-top: 0.5rem;
  }

  #main-content {
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    padding-top: 5rem;
  }

  section[id] {
    position: relative;
    top: unset !important;
    border-radius: 30px;
    min-height: unset;
    margin: 1rem auto 4rem auto;
    scroll-margin-top: 6rem;
    overflow: visible !important;
  }

  .section-inner {
    padding: 3rem 1.5rem;
  }

  #home {
    padding: 3rem 1.5rem 1.5rem;
    margin-bottom: 0 !important;
    scroll-margin-top: 4rem;
  }

  .hero-badge {
    font-size: 0.55rem;
    padding: 0.3rem 0.8rem;
    margin-bottom: 1.2rem;
    border-width: 2px;
    box-shadow: 0 2px 0 var(--c-border);
  }

  h1.hero-name.typing {
    font-size: clamp(2.2rem, 9.5vw, 4rem);
    white-space: nowrap;
    border-right: 0.10em solid var(--c-accent);
    min-height: 1.2em;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero-sub {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  .hero-ctas {
    gap: 1rem;
    margin-bottom: 3rem;
  }

  .btn-primary {
    padding: 0.6rem 1.6rem;
    font-size: 0.9rem;
    border-width: 2px !important;
    box-shadow: 0 4px 0 var(--c-border) !important;
  }

  .btn-primary:active {
    transform: translateY(4px) !important;
    box-shadow: 0 0 0 var(--c-border) !important;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 3rem;
  }

  /* Tickers */
  .roles-ticker-wrap {
    padding: 0.5rem 0;
    margin-bottom: 2rem;
  }

  .role-item {
    font-size: 0.95rem;
    padding-right: 0.5rem;
    letter-spacing: 0.05em;
  }

  .ticker-wrap {
    padding: 1rem 0;
  }

  .ticker-track {
    gap: 1.5rem;
  }

  .tick-icon {
    width: 44px;
    height: 44px;
    border-width: 3px;
    border-radius: 12px;
  }

  .tick-lbl {
    font-size: 0.6rem;
  }

  .tick {
    flex: 0 0 50px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-form {
    padding: 1.5rem;
    border-radius: 24px;
  }

  /* Mobile Article */
  .article-container {
    padding: 2.5rem 1.5rem;
    border-radius: 28px;
    margin: 3rem 1rem 5rem 1rem;
  }

  .mac-window,
  .code-window {
    margin: 1.5rem 0;
    border-radius: 12px;
    border-width: 2px;
  }

  .dark-chrome,
  .mac-chrome {
    padding: 0.4rem 0.6rem;
    border-bottom-width: 2px;
  }

  .dark-chrome .dot,
  .mac-chrome .dot {
    width: 8px;
    height: 8px;
    border-width: 2px;
  }

  .file-name {
    font-size: 0.65rem;
  }

  .code-content {
    padding: 0.75rem 1rem;
  }

  .code-content pre {
    font-size: 0.6rem;
    line-height: 1.4;
  }

  .pdf-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .pdf-card {
    padding: 0.75rem;
    gap: 0.6rem;
    border-radius: 12px;
    border-width: 2px;
  }

  .pdf-icon {
    width: 32px;
    height: 32px;
    border-width: 2px;
    border-radius: 8px;
  }

  .pdf-icon img {
    width: 16px;
    height: 16px;
  }

  .pdf-name {
    font-size: 0.75rem;
  }

  .pdf-meta {
    font-size: 0.65rem;
  }

  .pdf-action {
    font-size: 0.85rem;
  }

  .prose p,
  .prose ul,
  .prose ol {
    font-size: 1rem;
  }

  footer {
    position: relative;
    z-index: 11;
    border-radius: 30px 30px 0 0;
  }

  .footer-container {
    padding: 3rem 1.5rem 2rem;
    gap: 2rem;
  }

  .go-top-float {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    border-radius: 14px;
    box-shadow: 0 4px 0 var(--c-border);
  }
  .go-top-float.visible:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--c-border);
  }
  .go-top-float.visible:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--c-border);
  }
}

@media (max-width: 480px) {
  nav {
    top: 0.75rem;
  }

  .section-inner {
    padding: 2.5rem 1rem;
  }

  .send-btn {
    width: 100%;
    justify-content: center;
  }

  .proj-card {
    padding: 2.5rem 1.5rem 1.5rem;
    border-radius: 24px;
  }
}