/* style.css
   - Mobile-first, clean typography, light/dark via prefers-color-scheme
   - Button icons forced visible (avoids Android/Safari edge cases)
*/

:root{
  --bg:#ffffff;
  --text:#101114;
  --muted: rgba(16,17,20,.68);
  --muted2: rgba(16,17,20,.50);
  --line: rgba(16,17,20,.10);

  --accent:#6d5efc;
  --accentSoft: rgba(109,94,252,.14);

  --card:#ffffff;
  --shadow: 0 12px 36px rgba(0,0,0,.08);

  --max: 940px;

  --serif: "Playfair Display", ui-serif, Georgia, "Times New Roman", Times, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;

  color-scheme: light dark;
  scroll-behavior: smooth;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b0c10;
    --text:#f3f4f6;
    --muted: rgba(243,244,246,.72);
    --muted2: rgba(243,244,246,.55);
    --line: rgba(255,255,255,.12);

    --accent:#8b7bff;
    --accentSoft: rgba(139,123,255,.16);

    --card: rgba(255,255,255,.04);
    --shadow: 0 18px 60px rgba(0,0,0,.45);
  }
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Main container: predictable line length + padding */
.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 24px 100px;
  position: relative;
  z-index: 1;
}

/* Header row */
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.id{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

/* Avatar */
.avatar{
  width:52px;
  height:52px;
  border-radius:999px;
  border:1px solid var(--line);
  overflow:hidden;
  position:relative;
  flex:0 0 auto;
  background: rgba(0,0,0,.03);
}
@media (prefers-color-scheme: dark){
  .avatar{ background: rgba(255,255,255,.05); }
}

.avatar-img{
  width:100%;
  height:100%;
  display:block;
  object-fit: cover;
  border-radius:999px;
}

/* Overlay message (hover on desktop, active press on mobile) */
.avatar-overlay{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-family:"Amiri", serif;
  font-weight:700;
  font-size:15px;
  background: rgba(0,0,0,.65);
  color:#fff;
  opacity:0;
  transition: opacity .25s ease;
  text-align:center;
  padding: 6px;
}
.avatar:hover .avatar-overlay{ opacity:1; }
.avatar:active .avatar-overlay{ opacity:1; }

/* Main name */
.name{
  font-family: var(--serif);
  font-weight: 700;
  font-size: 48px;
  letter-spacing: -0.5px;
  line-height: 1.05;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Icon-only button (top-right) */
.iconbtn{
  width:48px;
  height:48px;
  border-radius:999px;
  border:1px solid var(--line);
  background: transparent;
  display:grid;
  place-items:center;
  transition: all .15s ease;
  flex:0 0 auto;
}
.iconbtn:hover{
  transform: translateY(-2px);
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.2);
}
@media (prefers-color-scheme: dark){
  .iconbtn:hover{
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.25);
  }
}
.iconbtn svg{
  width:20px;
  height:20px;
  opacity:.85;
  display:block;
}

/* Intro */
.intro{ margin-top: 24px; }

.intro-text{
  font-size: 19px;
  line-height: 1.75;
  letter-spacing: -0.1px;
  margin: 0 0 28px;
  color: var(--muted);
  font-weight: 500;
}

/* Action buttons row */
.pills{
  margin-top: 24px;
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  align-items:center;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  transition: all .2s ease;
  cursor:pointer;
  background: transparent;
  max-width: 100%;
}

/* Keep SVG icons visible even if browser/CSS gets weird */
.pill svg{
  display:inline-block !important;
  width:20px !important;
  height:20px !important;
  opacity:.9;
  flex:0 0 auto;
  visibility: visible !important;
}

.pill span{ display:inline-block; }

.pill.primary{
  background: var(--accentSoft);
  color: var(--accent);
}
.pill.secondary{
  color: var(--muted);
  border: 1px solid var(--line);
}
.pill:hover{
  transform: translateY(-2px);
  filter: brightness(1.05);
}

hr{
  border:0;
  border-top:1px solid var(--line);
  margin: 40px 0 48px;
}

.section-title{
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted2);
  margin: 0 0 18px;
  font-weight: 600;
}

/* Cards grid */
.projects{
  display:grid;
  gap: 20px;
  margin-top: 8px;
}

/* Card */
.project{
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 20px;
  padding: 24px;
  transition: all .25s ease;
  overflow:hidden;
}
.project:hover{
  transform: translateY(-4px);
  border-color: rgba(109,94,252,.3);
  box-shadow: 0 20px 50px rgba(0,0,0,.12);
}

.project-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.project-title{
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.2px;
  transition: color .25s ease;
  overflow-wrap: anywhere;
}
.project:hover .project-title{ color: var(--accent); }

.project-desc{
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

/* Tag pills */
.tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  min-width: 0;
  max-width: 100%;
}
.tag{
  font-size: 13px;
  font-weight: 600;
  color: var(--muted2);
  border: 1px solid var(--line);
  background: rgba(0,0,0,.02);
  padding: 6px 12px;
  border-radius: 999px;
  transition: all .2s ease;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.tag:hover{
  transform: scale(1.08);
  background: rgba(109,94,252,.08);
}

/* Small status text on some cards */
.live{
  color: var(--muted2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Dedicated “open” link for the ABC site (only outbound click target) */
.project-link{
  color: var(--muted2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: all .25s ease;
}
.project-link:hover{
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Small inline visual pill (kept subtle on purpose) */
.gifpill{
  display: inline-block;
  width: 100px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  vertical-align: middle;
  margin-left: 12px;
  transform: translateY(3px);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  background: rgba(255,255,255,.04);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.gifpill img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
}
.gifpill:hover{
  border-color: rgba(109,94,252,.5);
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
}
@media (prefers-color-scheme: dark){
  .gifpill{
    box-shadow: 0 16px 42px rgba(0,0,0,.65);
  }
  .gifpill:hover{
    border-color: rgba(139,123,255,.6);
  }
}

/* Connect / footer */
.connect{ margin-top: 48px; }

.links{
  display:flex;
  gap:24px;
  flex-wrap:wrap;
  font-weight: 600;
  font-size: 16px;
}
.links a{
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: all .25s ease;
}
.links a:hover{
  border-bottom-color: var(--accent);
  color: var(--accent);
}

footer{
  margin-top: 32px;
  color: var(--muted2);
  font-size: 14px;
}

/* Responsive tuning */
@media (max-width: 760px){
  .wrap{ padding: 44px 18px 80px; }
  .name{ font-size: 38px; }
  .intro-text{ font-size: 18px; }
  .gifpill{ width: 92px; height: 34px; }
  .live{ display:none; }
}

@media (max-width: 420px){
  .wrap{ padding: 40px 16px 76px; }
  .name{ font-size: 34px; }
  .pills{ gap:12px; }
  .pill{ padding: 12px 16px; }
}

::selection{ background: rgba(109,94,252,.2); }

/* Respect reduced motion preferences (AOS will still run, but hover transitions stay simple) */
@media (prefers-reduced-motion: reduce){
  .project, .pill, .iconbtn, .tag, .gifpill{ transition:none !important; }
}
