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

:root {
  --bg: #f4f7f9;
  --card: #ffffff;
  --ink: #111318;
  --ink2: #505560;
  --ink3: #8c9199;
  --green: #0a6fa8;
  --green-light: #d4e8f5;
  --green-mid: #4a9fcf;
  --line: #dde4ea;
  --warm: #edf2f7;
  --serif: 'Fraunces', serif;
  --sans: 'Instrument Sans', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--green-mid);
  color: #fff;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: rgba(244, 247, 249, .92);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.03em;
}

.nav-logo span {
  color: var(--green);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink2);
  text-decoration: none;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .2s;
}

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

.nav-cta {
  background: var(--green);
  color: #fff;
  padding: .55rem 1.25rem;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.nav-cta:hover {
  background: #074d78;
  transform: translateY(-1px);
}

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9rem 3rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 5rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  opacity: 0;
  animation: up .7s .1s forwards;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--green);
}

h1 {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--ink);
  opacity: 0;
  animation: up .8s .25s forwards;
}

h1 .italic {
  font-style: italic;
  font-weight: 300;
  color: var(--green);
}

.hero-desc {
  margin-top: 1.75rem;
  font-size: 1.05rem;
  color: var(--ink2);
  max-width: 420px;
  line-height: 1.85;
  opacity: 0;
  animation: up .8s .4s forwards;
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  gap: .875rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: up .8s .55s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.6rem;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .22s;
  border: 1.5px solid transparent;
}

.btn-fill {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.btn-fill:hover {
  background: #074d78;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 111, 168, .25);
}

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-line:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

.hero-right {
  opacity: 0;
  animation: fadeIn .9s .5s forwards;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-big-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, .05);
}

.hbc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.hbc-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.hbc-name small {
  display: block;
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 400;
  color: var(--ink3);
  margin-top: .1rem;
  font-style: normal;
}

.dot-live {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--green);
  background: var(--green-light);
  padding: .3rem .7rem;
  border-radius: 100px;
}

.dot-live::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 2s infinite;
}

.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.chip {
  display: inline-flex;
  padding: .3rem .75rem;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
  background: var(--warm);
  color: var(--ink2);
  border: 1px solid var(--line);
  letter-spacing: .02em;
}

.chip.new {
  background: var(--green-light);
  color: var(--green);
  border-color: #a8d4ed;
}

.hero-mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mini-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}

.mc-num {
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.mc-label {
  font-size: .75rem;
  color: var(--ink3);
  margin-top: .2rem;
}

.mc-tag {
  display: inline-block;
  margin-top: .75rem;
  font-size: .7rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-light);
  padding: .2rem .6rem;
  border-radius: 4px;
}

.section-tag {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.section-tag::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.1;
  color: var(--ink);
}

h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--green);
}

section {
  padding: 6.5rem 3rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

#about {
  background: var(--card);
  border-top: 1px solid var(--line);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-placeholder {
  margin-top: 1rem;
  background: var(--warm);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-size: .875rem;
  color: var(--ink3);
  font-style: italic;
  line-height: 1.6;
}

.about-skills {
  padding-top: .5rem;
}

.skill-section-title {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink3);
  margin-bottom: 1.25rem;
  margin-top: 1.75rem;
}

.skill-section-title:first-child {
  margin-top: 0;
}

.skill-item {
  margin-bottom: 1rem;
}

.skill-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .4rem;
}

.skill-top span:first-child {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
}

.skill-top span:last-child {
  font-size: .75rem;
  color: var(--ink3);
}

.bar {
  height: 5px;
  background: var(--warm);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
  width: 0;
  transition: width 1.3s cubic-bezier(.22, 1, .36, 1);
}

.bar-fill.new {
  background: var(--green-mid);
}

#projects {
  background: var(--bg);
}

.proj-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  position: relative;
  overflow: hidden;
}

.proj-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 111, 168, .04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
}

.proj-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .09);
  border-color: #b0cfe0;
}

.proj-card:hover::after {
  opacity: 1;
}

.proj-num {
  font-family: var(--serif);
  font-size: 5rem;
  font-weight: 300;
  color: var(--line);
  line-height: 1;
  margin-bottom: .75rem;
  font-style: italic;
}

.proj-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.03em;
  margin-bottom: .75rem;
}

.proj-desc {
  color: var(--ink2);
  font-size: .9375rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.proj-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.5rem;
}

.proj-link-soon {
  font-size: .8rem;
  color: var(--ink3);
  font-style: italic;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .85rem;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.badge-dev {
  background: var(--green-light);
  color: var(--green);
}

.badge-dev::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s infinite;
}

#contact {
  background: var(--ink);
  color: #fff;
}

#contact .section-tag {
  color: rgba(255, 255, 255, .35);
}

#contact .section-tag::after {
  background: rgba(255, 255, 255, .1);
}

#contact h2 {
  color: #fff;
}

#contact h2 em {
  color: var(--green-mid);
}

.contact-layout {
  margin-top: 3rem;
}

.contact-intro {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .6);
  line-height: 1.85;
  margin-bottom: 2rem;
  max-width: 580px;
}

.clinks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .875rem;
}

.clink {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  transition: all .22s;
}

.clink:hover {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(74, 159, 207, .4);
  transform: translateY(-3px);
}

.clink-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clink-meta {
  flex: 1;
}

.clink-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .35);
  margin-bottom: .1rem;
}

.clink-val {
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .85);
}

.clink-arrow {
  color: rgba(255, 255, 255, .2);
  font-size: 1rem;
  transition: color .2s, transform .2s;
}

.clink:hover .clink-arrow {
  color: var(--green-mid);
  transform: translateX(3px);
}

footer {
  background: #0a0a09;
  padding: 1.75rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.f-name {
  font-family: var(--serif);
  font-size: .95rem;
  color: rgba(255, 255, 255, .35);
  font-style: italic;
}

.f-copy {
  font-size: .78rem;
  color: rgba(255, 255, 255, .2);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s cubic-bezier(.22, 1, .36, 1), transform .75s cubic-bezier(.22, 1, .36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.d1 {
  transition-delay: .1s;
}

.d2 {
  transition-delay: .2s;
}

.d3 {
  transition-delay: .3s;
}

@keyframes up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .3;
  }
}

@media (max-width: 860px) {
  nav {
    padding: 1rem 1.25rem;
  }

  .nav-links {
    display: none;
  }

  section {
    padding: 5rem 1.25rem;
  }

  .hero-inner,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero-right {
    display: none;
  }

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

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

  footer {
    flex-direction: column;
    gap: .75rem;
    text-align: center;
    padding: 1.5rem;
  }
}