:root{
  --ink: #f7f7f7;
  --muted: #a9a9a9;
  --paper: #050505;
  --paper-2: #0b0b0d;
  --panel: #101012;
  --line: rgba(255, 255, 255, .13);
  --deep: #f7f7f7;
  --red: #6f1025;
  --red-deep: #3f0714;
  --red-soft: rgba(111, 16, 37, .24);
  --white-soft: rgba(255, 255, 255, .08);
  --shadow: 0 22px 70px rgba(0, 0, 0, .52);
  --radius: 8px;
}

*{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(111, 16, 37, .34), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, .08), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, .05), transparent 26%),
    var(--paper);
  line-height: 1.6;
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 18%, rgba(111, 16, 37, .2) 18.1%, transparent 38%),
    linear-gradient(180deg, transparent, rgba(94, 13, 29, .22));
  z-index: -1;
}

body::after{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  opacity: .12;
  mix-blend-mode: screen;
  z-index: -1;
}

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

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

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

.container{
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 5, 5, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner{
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  min-height: 76px;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark{
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-weight: 800;
  font-size: 13px;
}

.brand-name,
.brand-role{
  display: block;
}

.brand-name{
  font-weight: 800;
  line-height: 1.1;
}

.brand-role{
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav{
  position: relative;
}

.nav-toggle{
  display: none;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
}

.nav-toggle-bar{
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: var(--ink);
}

.nav-panel{
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link{
  padding: 9px 11px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-link:hover{
  color: var(--ink);
  background: var(--red-soft);
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover{
  transform: translateY(-1px);
}

.btn-small{
  min-height: 40px;
  padding: 10px 13px;
}

.btn-primary{
  color: #fff;
  background: linear-gradient(135deg, #7c132a, var(--red-deep));
  box-shadow: 0 12px 30px rgba(111, 16, 37, .42);
}

.btn-primary:hover{
  background: linear-gradient(135deg, #8a1730, #53091a);
}

.btn-secondary{
  color: var(--ink);
  background: var(--white-soft);
  border-color: rgba(255, 255, 255, .22);
}

.hero{
  padding: 86px 0 54px;
}

.hero-layout{
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.contact-card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 16, 18, .82);
  box-shadow: var(--shadow);
}

.hero-copy{
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
}

.hero-copy::after{
  content: "";
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 136px;
  height: 136px;
  border: 1px solid rgba(111, 16, 37, .72);
  border-radius: 50%;
  background:
    linear-gradient(var(--red) 0 0) center / 1px 100% no-repeat,
    linear-gradient(90deg, var(--red) 0 0) center / 100% 1px no-repeat;
  opacity: .42;
}

.eyebrow{
  margin: 0 0 14px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1{
  position: relative;
  margin: 0;
  max-width: 820px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: .96;
  letter-spacing: 0;
  z-index: 1;
}

.hero-summary{
  position: relative;
  max-width: 72ch;
  margin: 24px 0 0;
  color: #d6d6d6;
  font-size: 17px;
  z-index: 1;
}

.hero-actions{
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  z-index: 1;
}

.hero-panel{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(111, 16, 37, .36), transparent 40%),
    #0a0a0b;
  color: #fff;
}

.portrait-bubble{
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin: 0 auto 18px;
  padding: 8px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .18), transparent 32%),
    linear-gradient(135deg, #7a1329, #140306);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .5),
    0 0 0 10px rgba(111, 16, 37, .14);
  overflow: hidden;
}

.portrait-bubble img{
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  border: 1px solid rgba(255, 255, 255, .18);
  transform: scale(1.18);
}

.signal-card{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-weight: 700;
}

.signal-dot{
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(111, 16, 37, .28);
}

.quick-facts{
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
}

.quick-facts div{
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.quick-facts dt{
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.quick-facts dd{
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 700;
}

.section{
  padding: 48px 0;
}

.section-head{
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
}

.section-kicker{
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-weight: 800;
}

.section h2,
.contact-card h2{
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  letter-spacing: 0;
}

.section-head p,
.contact-card p{
  margin: 10px 0 0;
  max-width: 700px;
  color: var(--muted);
}

.timeline,
.stack{
  display: grid;
  gap: 14px;
}

.timeline-item{
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: stretch;
}

.card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 16, 18, .86);
  padding: 20px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .28);
}

.feature-card{
  background: linear-gradient(135deg, rgba(111, 16, 37, .34), rgba(16, 16, 18, .9) 48%);
}

.card-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.card h3{
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
}

.card-subtitle{
  margin: 7px 0 0;
  color: var(--muted);
}

.date-pill,
.project-label{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(111, 16, 37, .58);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(111, 16, 37, .28);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.bullets{
  margin: 0;
  padding-left: 20px;
  color: #d3d3d3;
}

.bullets li{
  margin: 7px 0;
}

.project-grid{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.project-card{
  grid-column: span 2;
  min-height: 230px;
}

.project-card h3{
  margin-top: 20px;
}

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

.cert-layout,
.skills-layout{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.badge-grid{
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.badge{
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}

.tags{
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.tag{
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
  font-size: 13px;
  font-weight: 700;
}

.contact-section{
  padding-bottom: 70px;
}

.contact-card{
  display: grid;
  grid-template-columns: 1fr minmax(280px, .7fr);
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(111, 16, 37, .52), transparent 46%),
    #0a0a0b;
  color: #fff;
}

.contact-card .eyebrow{
  color: #c75a73;
}

.contact-card p{
  color: rgba(255, 255, 255, .72);
}

.contact-links{
  display: grid;
  gap: 10px;
}

.contact-links a{
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.contact-links a:hover{
  background: rgba(111, 16, 37, .34);
}

.site-footer{
  border-top: 1px solid var(--line);
  padding: 22px 0 28px;
  color: var(--muted);
}

.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-inner p{
  margin: 0;
}

.footer-inner a{
  font-weight: 800;
  color: var(--ink);
}

.reveal{
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: var(--d, 0ms);
}

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

@media (max-width: 980px){
  .header-inner{
    grid-template-columns: 1fr auto auto;
  }

  .nav-toggle{
    display: block;
  }

  .nav-panel{
    position: absolute;
    right: 0;
    top: 52px;
    display: none;
    min-width: 230px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  .nav-panel.open{
    display: grid;
  }

  .nav-link{
    width: 100%;
  }

  .hero-layout,
  .contact-card{
    grid-template-columns: 1fr;
  }

  .hero{
    padding-top: 48px;
  }

  .project-grid,
  .cert-layout,
  .skills-layout{
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card:nth-child(1),
  .project-card:nth-child(2){
    grid-column: auto;
    min-height: auto;
  }

  .badge-grid{
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 640px){
  .container{
    width: min(100% - 24px, 1120px);
  }

  .header-inner{
    gap: 10px;
    min-height: 68px;
  }

  .brand-role{
    display: none;
  }

  .btn-small{
    min-height: 38px;
    padding: 9px 11px;
  }

  .hero{
    padding: 34px 0 34px;
  }

  .hero-copy,
  .hero-panel,
  .card{
    padding: 18px;
  }

  .hero-copy::after{
    display: none;
  }

  .hero h1{
    font-size: 38px;
  }

  .hero-summary{
    font-size: 15px;
  }

  .section{
    padding: 34px 0;
  }

  .section-head,
  .timeline-item,
  .card-top{
    grid-template-columns: 1fr;
    display: grid;
  }

  .section-kicker{
    width: 40px;
    height: 40px;
  }

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