/* =========================================================
   HASHRIN.COM — MOBILE-FIRST STYLES
   ========================================================= */

:root{
  --bg:#090b0e;
  --surface:#101319;
  --surface-2:#171b22;
  --text:#f1f3f5;
  --muted:#989faa;
  --faint:#626a77;
  --line:rgba(255,255,255,.09);
  --accent:#9cffc2;
  --accent-2:#80aaff;
  --max:1160px;
  --header-height:64px;
}

[data-theme="light"]{
  --bg:#f6f7f9;
  --surface:#fff;
  --surface-2:#eef0f4;
  --text:#111318;
  --muted:#5f6570;
  --faint:#858b96;
  --line:rgba(0,0,0,.10);
  --accent:#08783f;
  --accent-2:#245fba;
}

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

html{
  scroll-behavior:smooth;
  scroll-padding-top:calc(var(--header-height) + 20px);
}

body{
  margin:0;
  min-width:320px;
  overflow-x:hidden;
  background:var(--bg);
  color:var(--text);
  font-family:"DM Sans",system-ui,sans-serif;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

::selection{
  background:var(--accent);
  color:#07110b;
}

a{
  color:inherit;
  text-decoration:none;
  overflow-wrap:anywhere;
}

button,
a{
  -webkit-tap-highlight-color:transparent;
}

button{
  font:inherit;
}

img,
svg,
video{
  display:block;
  max-width:100%;
  height:auto;
}

.noise{
  position:fixed;
  inset:0;
  z-index:100;
  pointer-events:none;
  opacity:.025;
  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='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header{
  width:100%;
  max-width:var(--max);
  min-height:var(--header-height);
  margin:auto;
  padding:0 20px;
  display:flex;
  align-items:center;
  gap:16px;
  position:sticky;
  top:0;
  z-index:50;
  background:color-mix(in srgb,var(--bg) 88%,transparent);
  backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
}

.brand{
  flex:0 0 auto;
  font:600 18px "JetBrains Mono",monospace;
  letter-spacing:-.05em;
}

.brand span{
  color:var(--accent);
}

.header-actions{
  order:2;
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:0;
}

.theme-toggle,
.mobile-menu-toggle{
  width:40px;
  height:40px;
  flex:0 0 40px;
  border:1px solid var(--line);
  border-radius:50%;
  background:transparent;
  color:var(--text);
  cursor:pointer;
}

.mobile-menu-toggle{
  order:1;
  margin-left:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  border-radius:8px;
}

.mobile-menu-toggle span{
  width:14px;
  height:1px;
  background:currentColor;
  transition:transform .2s ease,opacity .2s ease;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1){
  transform:translateY(5px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2){
  opacity:0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3){
  transform:translateY(-5px) rotate(-45deg);
}

nav{
  display:none;
  position:absolute;
  top:calc(100% + 1px);
  left:0;
  right:0;
  padding:10px 20px 18px;
  flex-direction:column;
  gap:0;
  background:color-mix(in srgb,var(--bg) 96%,transparent);
  backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
}

.site-header.menu-open nav{
  display:flex;
}

nav a{
  padding:13px 4px;
  color:var(--muted);
  font-size:14px;
  border-bottom:1px solid var(--line);
}

nav a:last-child{
  border-bottom:0;
}

nav a:hover{
  color:var(--text);
}
nav a:focus-visible{
  color:var(--text);
}

/* =========================================================
   GLOBAL LAYOUT
   ========================================================= */

main{
  width:100%;
  max-width:var(--max);
  margin:auto;
  padding:0 16px;
}

.hero,
.section,
.contact{
  width:100%;
}

h1,
h2,
h3,
p{
  overflow-wrap:break-word;
}

h1{
  margin:0 0 22px;
  font-size:clamp(46px,13vw,72px);
  line-height:.95;
  letter-spacing:-.065em;
  font-weight:600;
}

h1 em{
  color:var(--muted);
  font-style:normal;
}

h2{
  margin:0;
  font-size:clamp(36px,10.5vw,56px);
  line-height:1;
  letter-spacing:-.055em;
  font-weight:600;
}

h3{
  margin:0 0 3px;
  font-size:20px;
  line-height:1.3;
  letter-spacing:-.025em;
}

.eyebrow{
  margin:0 0 14px;
  color:var(--muted);
  font:500 10px "JetBrains Mono",monospace;
  text-transform:uppercase;
  letter-spacing:.11em;
}

.button{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:8px;
  font-size:13px;
  font-weight:600;
  line-height:1.2;
  transition:transform .2s ease,border-color .2s ease,background .2s ease;
}

.button:hover{
  transform:translateY(-2px);
  border-color:var(--faint);
}

.button.primary{
  background:var(--text);
  color:var(--bg);
  border-color:var(--text);
}

.button.ghost{
  color:var(--muted);
}

/* =========================================================
   HERO
   ========================================================= */

.hero{
  min-height:calc(100svh - var(--header-height));
  display:flex;
  align-items:center;
  padding:48px 0 42px;
}

.hero-copy{
  width:100%;
  max-width:850px;
}

.hero-role{
  margin:0 0 18px;
  color:var(--accent);
  font:500 10px/1.6 "JetBrains Mono",monospace;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.lede{
  max-width:720px;
  margin:0;
  color:var(--muted);
  font-size:17px;
  line-height:1.65;
}

.hero-personal{
  max-width:700px;
  margin:20px 0 0;
  color:var(--text);
  font-size:19px;
  line-height:1.5;
  letter-spacing:-.02em;
}

.hero-interests{
  display:flex;
  flex-wrap:wrap;
  gap:7px 12px;
  margin-top:24px;
  color:var(--faint);
  font:10px/1.7 "JetBrains Mono",monospace;
}

.hero-interests span:not(:last-child)::after{
  content:"·";
  margin-left:12px;
  color:var(--faint);
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:26px;
}

/* =========================================================
   SECTIONS
   ========================================================= */

.section{
  padding:78px 0;
  border-bottom:1px solid var(--line);
  scroll-margin-top:var(--header-height);
}

.section-heading{
  margin-bottom:42px;
}

/* This is intentionally explicit. It prevents headings from
   sitting directly on top of the section content. */
.section-heading + .about-grid,
.section-heading + .timeline,
.section-heading + .project-grid,
.section-heading + .writing-intro,
.section-heading + .life-grid{
  margin-top:0;
}

/* =========================================================
   ABOUT
   ========================================================= */

.about-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:42px;
}

.about-copy{
  color:var(--muted);
  font-size:15px;
}

.about-copy .big-copy{
  color:var(--text);
  font-size:20px;
  line-height:1.5;
  letter-spacing:-.025em;
}

.signature-line{
  color:var(--text)!important;
  font-size:18px!important;
  line-height:1.4;
  border-left:2px solid var(--accent);
  padding-left:18px;
}

.about-aside{
  border-top:1px solid var(--line);
}

.fact{
  padding:17px 0;
  border-bottom:1px solid var(--line);
}

.fact span{
  display:block;
  margin-bottom:5px;
  color:var(--faint);
  font:10px "JetBrains Mono",monospace;
  text-transform:uppercase;
  letter-spacing:.1em;
}

.fact strong{
  font-size:15px;
}

/* =========================================================
   EXPERIENCE
   ========================================================= */

.timeline{
  width:100%;
  max-width:900px;
  margin:0;
}

.role{
  position:relative;
  padding:0 0 40px 24px;
  margin:0 0 40px;
  border-left:1px solid var(--line);
}

.role::before{
  content:"";
  position:absolute;
  left:-5px;
  top:3px;
  width:7px;
  height:7px;
  border:2px solid var(--bg);
  border-radius:50%;
  background:var(--faint);
}

.role.featured::before{
  background:var(--accent);
  box-shadow:0 0 15px var(--accent);
}

.role-meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:10px;
  color:var(--faint);
  font:10px/1.6 "JetBrains Mono",monospace;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.company{
  margin:0 0 18px;
  color:var(--accent);
}

.company a{
  color:var(--accent);
  transition:opacity .2s ease;
}

.company a:hover{
  opacity:.75;
}

.company span{
  color:var(--faint);
}

.role ul{
  margin:0;
  padding-left:18px;
  color:var(--muted);
}

.role li{
  margin:9px 0;
}

.role.compact{
  margin-bottom:0;
  padding-bottom:0;
}

.role.compact p:last-child{
  color:var(--muted);
}

/* =========================================================
   TAGS
   ========================================================= */

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

.tags span{
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  font:9px "JetBrains Mono",monospace;
}

/* =========================================================
   PROJECTS
   ========================================================= */

.project-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.project-card{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:24px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  transition:transform .25s ease,border-color .25s ease;
}

.project-card:hover{
  transform:translateY(-3px);
  border-color:color-mix(in srgb,var(--accent) 35%,var(--line));
}

.project-card.cowin{
  grid-row:auto;
  min-height:0;
  background:linear-gradient(150deg,var(--surface),var(--surface-2));
}

.project-number{
  margin-bottom:28px;
  color:var(--faint);
  font:11px "JetBrains Mono",monospace;
}

.project-type{
  color:var(--accent);
  font:10px "JetBrains Mono",monospace;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.project-card h3{
  margin:10px 0 14px;
  font-size:27px;
}

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

.project-note{
  margin-top:20px;
  padding-left:14px;
  border-left:2px solid var(--accent);
  color:var(--text)!important;
  font-size:14px!important;
}

.project-note.secondary{
  border-left-color:var(--accent-2);
}

.project-link{
  margin-top:auto;
  color:var(--accent);
  font-size:13px;
  font-weight:600;
}

/* =========================================================
   WRITING
   ========================================================= */

.writing-intro{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-bottom:28px;
}

.writing-intro p{
  margin:0;
  color:var(--muted);
  font-size:15px;
}

.writing-intro .muted{
  color:var(--faint);
}

.blog-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.blog-card{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:24px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
}

.blog-card.full-post{
  min-height:0;
}

.blog-meta{
  color:var(--accent)!important;
  font:10px "JetBrains Mono",monospace!important;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.blog-card h3{
  margin-top:16px;
  font-size:24px;
}

.post-body{
  color:var(--muted);
  font-size:15px;
  line-height:1.72;
}

.post-body p{
  margin:0 0 22px;
}

.post-body p:last-child{
  margin-bottom:0;
}

.related-link{
  display:inline-block;
  margin-top:28px;
  color:var(--accent);
  font-size:12px;
  font-weight:600;
}

.personal-post{
  background:linear-gradient(150deg,var(--surface),#151b18);
}

/* =========================================================
   BEYOND WORK
   ========================================================= */

.life-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.life-card{
  min-width:0;
  min-height:0;
  padding:24px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
}

.life-icon{
  height:42px;
  color:var(--accent);
  font-size:25px;
}

.life-label{
  color:var(--faint);
  font:10px "JetBrains Mono",monospace;
  text-transform:uppercase;
  letter-spacing:.1em;
}

.life-card h3{
  margin:7px 0 10px;
  font-size:22px;
}

.life-card p:not(.life-label){
  color:var(--muted);
  font-size:13px;
}

.cats{
  background:linear-gradient(150deg,var(--surface),#161b15);
}

.food{
  background:linear-gradient(150deg,var(--surface),#15191e);
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact{
  max-width:850px;
  padding:96px 0 86px;
}

.contact h2{
  margin-bottom:20px;
}

.contact>p:not(.eyebrow){
  max-width:650px;
  color:var(--muted);
  font-size:17px;
}

.contact .hero-actions{
  margin-top:26px;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer{
  width:100%;
  max-width:var(--max);
  margin:auto;
  padding:24px 16px 38px;
  text-align:center;
  color:var(--faint);
  font:10px "JetBrains Mono",monospace;
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width:380px){
  .site-header{
    padding:0 12px;
  }

  main{
    padding:0 14px;
  }

  h1{
    font-size:clamp(42px,12.5vw,58px);
  }

  h2{
    font-size:clamp(34px,10vw,48px);
  }

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

  .hero-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .hero-actions .button{
    width:100%;
  }

  .section{
    padding:68px 0;
  }

  .section-heading{
    margin-bottom:34px;
  }

  .project-card,
  .blog-card,
  .life-card{
    padding:20px;
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (min-width:600px){
  :root{
    --header-height:74px;
  }

  .site-header{
    padding:0 24px;
  }

  main{
    padding:0 24px;
  }

  .hero{
    padding:70px 0 60px;
  }

  h1{
    font-size:clamp(58px,11vw,82px);
  }

  .lede{
    font-size:18px;
  }

  .hero-personal{
    font-size:20px;
  }

  .about-copy .big-copy{
    font-size:22px;
  }

  .project-card,
  .blog-card,
  .life-card{
    padding:28px;
  }

  .project-grid,
  .blog-grid{
    grid-template-columns:1fr 1fr;
  }

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

  .project-card.cowin{
    grid-row:span 2;
    min-height:620px;
  }
}

/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width:901px){
  :root{
    --header-height:82px;
  }

  .site-header{
    padding:0 24px;
    max-width:var(--max);
  }

  .mobile-menu-toggle{
    display:none;
  }

  nav{
    position:static;
    display:flex;
    flex-direction:row;
    align-items:center;
    gap:26px;
    padding:0;
    background:none;
    backdrop-filter:none;
    border:0;
    box-shadow:none;
  }

  nav a{
    min-height:0;
    display:block;
    padding:0;
    border:0;
    font-size:13px;
  }

  .hero{
    min-height:calc(100dvh - var(--header-height));
    padding:60px 0;
  }

  .eyebrow{
    font-size:11px;
    letter-spacing:.13em;
    margin-bottom:18px;
  }

  h1{
    font-size:clamp(64px,8vw,96px);
    margin-bottom:28px;
  }

  .hero-role{
    font-size:12px;
    margin-bottom:24px;
  }

  .lede{
    font-size:19px;
  }

  .hero-personal{
    margin-top:25px;
    font-size:21px;
  }

  .hero-interests{
    gap:8px 18px;
    margin-top:30px;
    font-size:11px;
  }

  .hero-interests span:not(:last-child)::after{
    margin-left:18px;
  }

  .hero-actions{
    gap:9px;
    margin-top:32px;
  }

  .section{
    padding:130px 0;
  }

  .section-heading{
    margin-bottom:64px;
  }

  h2{
    font-size:clamp(37px,5vw,59px);
  }

  .about-grid{
    grid-template-columns:1.25fr .75fr;
    gap:80px;
  }

  .about-copy{
    font-size:16px;
  }

  .about-copy .big-copy{
    font-size:23px;
  }

  .timeline{
    max-width:900px;
    margin-left:auto;
  }

  .role{
    padding:0 0 54px 34px;
    margin-bottom:54px;
  }

  .role-meta{
    flex-direction:row;
    justify-content:space-between;
    gap:20px;
  }

  h3{
    font-size:21px;
  }

  .project-grid{
    grid-template-columns:1fr 1fr;
    gap:16px;
  }

  .project-card{
    min-height:350px;
    padding:30px;
    border-radius:14px;
  }

  .project-card.cowin{
    grid-row:span 2;
    min-height:716px;
  }

  .project-card h3{
    font-size:30px;
  }

  .writing-intro{
    grid-template-columns:1fr 1fr;
    gap:60px;
    margin-bottom:35px;
  }

  .writing-intro p{
    font-size:16px;
  }

  .blog-grid{
    grid-template-columns:1fr 1fr;
    gap:16px;
  }

  .blog-card{
    padding:30px;
    border-radius:12px;
  }

  .blog-card h3{
    font-size:27px;
  }

  .life-grid{
    grid-template-columns:repeat(3,1fr);
    gap:14px;
  }

  .life-card{
    min-height:280px;
    padding:27px;
    border-radius:14px;
  }

  .life-card h3{
    font-size:23px;
  }

  .contact{
    padding:150px 0 120px;
  }

  .contact>p:not(.eyebrow){
    font-size:18px;
  }

  footer{
    padding:25px 24px 45px;
  }
}

/* =========================================================
   TOUCH DEVICES
   ========================================================= */

@media (hover:none){
  .button:hover,
  .project-card:hover{
    transform:none;
  }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion:reduce){
  html{
    scroll-behavior:auto;
  }

  *,
  *::before,
  *::after{
    transition-duration:0.01ms!important;
    animation-duration:0.01ms!important;
    animation-iteration-count:1!important;
  }
}
