/* ahmetmertduzgun.com. Light and dark tokens; the theme follows the device until the
   visitor picks one with the switch, which is then remembered. */
:root{
  --bg:#F6F4EF; --bg-2:#FFFFFF; --bg-3:#ECE9E1;
  --text:#17181C; --muted:#5E6270; --faint:#8A8E99; --line:rgba(23,24,28,.10);
  --accent:#D9441C; --accent-ink:#FFFFFF;
  color-scheme:light;
}
:root[data-theme="dark"]{
  --bg:#0C0E13; --bg-2:#151821; --bg-3:#1D212C;
  --text:#EEF0F4; --muted:#A0A6B3; --faint:#6F7584; --line:rgba(255,255,255,.08);
  --accent:#FF6A3D; --accent-ink:#140804;
  color-scheme:dark;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0C0E13; --bg-2:#151821; --bg-3:#1D212C;
    --text:#EEF0F4; --muted:#A0A6B3; --faint:#6F7584; --line:rgba(255,255,255,.08);
    --accent:#FF6A3D; --accent-ink:#140804;
    color-scheme:dark;
  }
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);
  font-family:"Rubik",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:17px;line-height:1.55;
  -webkit-font-smoothing:antialiased;overflow-x:hidden}
img{display:block;max-width:100%}
a{color:inherit}
h1,h2,h3{margin:0;line-height:1.08;font-weight:700}
p{margin:0}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---- shell: fixed side menu on wide screens, drawer on phones ---- */
.shell{display:grid;grid-template-columns:292px minmax(0,1fr);min-height:100vh}
.main{min-width:0;padding-bottom:72px;container:content / inline-size}
.wrap{width:min(1040px,100% - 48px);margin-inline:auto}
.side{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:28px;padding:28px 18px 22px;
  border-right:1px solid var(--line);background:var(--bg);overflow-y:auto;overflow-x:hidden}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;padding:0 8px}
.brand img{width:34px;height:34px;border-radius:7px;flex:none}
.brand b{display:block;font-weight:700;letter-spacing:-.01em;line-height:1.2}
:root[data-theme="dark"] .brand img{filter:invert(1)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .brand img{filter:invert(1)}}

.side nav{display:flex;flex-direction:column;gap:2px}
.nav-label{font-size:.8rem;color:var(--faint);padding:18px 10px 6px}
.nav-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:10px;text-decoration:none;color:var(--muted);font-weight:500}
.nav-item:hover{color:var(--text);background:var(--bg-3)}
.nav-item[aria-current="page"]{color:var(--text);background:var(--bg-3);box-shadow:inset 3px 0 0 var(--accent)}
.nav-item > span:first-child{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.count{flex:none;font-size:.8rem;color:var(--faint);font-weight:400}
.nav-group summary{list-style:none;display:flex;align-items:center;justify-content:space-between;cursor:pointer;
  border-radius:8px;user-select:none}
.nav-group summary::-webkit-details-marker{display:none}
.nav-group summary:hover{color:var(--text)}
.nav-group summary svg{width:15px;height:15px;transition:transform .2s}
.nav-group:not([open]) summary svg{transform:rotate(-90deg)}
.nav-group > a{margin-top:2px}

.theme-switch{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:0 8px;border-radius:12px;background:var(--bg-3)}
.theme-switch button{display:flex;align-items:center;justify-content:center;gap:7px;padding:7px 8px;border:0;border-radius:9px;
  background:none;color:var(--muted);font:inherit;font-size:.86rem;font-weight:500;cursor:pointer}
.theme-switch button svg{width:16px;height:16px}
.theme-switch button[aria-pressed="true"]{background:var(--bg-2);color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,.18)}
.theme{width:38px;height:38px;border-radius:50%;border:1px solid var(--line);
  background:var(--bg-2);color:var(--text);display:grid;place-items:center;cursor:pointer;flex:none}
.theme svg{width:18px;height:18px}
.theme .sun{display:none}
:root[data-theme="dark"] .theme .sun{display:block}
:root[data-theme="dark"] .theme .moon{display:none}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .theme .sun{display:block}
  :root:not([data-theme="light"]) .theme .moon{display:none}}

.login{margin-top:auto;display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;
  color:var(--faint);text-decoration:none;font-size:.86rem;align-self:flex-start}
.login svg{width:15px;height:15px}
.login:hover{color:var(--text);background:var(--bg-3)}

.topbar{display:none}
.top-actions{display:flex;align-items:center;gap:6px}
@media (min-width:761px) and (max-width:1100px){.shell{grid-template-columns:232px minmax(0,1fr)}.side{padding:24px 12px 18px}}
@media (max-width:760px){
  .shell{grid-template-columns:1fr}
  .topbar{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:30;height:58px;padding:0 16px;
    background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
  .topbar .brand{padding:0}
  .topbar .brand img{width:28px;height:28px}
  .menu-btn{width:40px;height:40px;border:0;background:none;display:grid;place-content:center;gap:6px;cursor:pointer;color:var(--text)}
  .menu-btn span{display:block;width:22px;height:2px;background:currentColor;transition:transform .2s}
  .menu-open .menu-btn span:first-child{transform:translateY(4px) rotate(45deg)}
  .menu-open .menu-btn span:last-child{transform:translateY(-4px) rotate(-45deg)}
  .side{position:fixed;z-index:25;top:58px;left:0;right:0;height:calc(100vh - 58px);border-right:0;
    transform:translateY(-8px);opacity:0;visibility:hidden;transition:opacity .2s,transform .2s,visibility .2s}
  .side > .brand,.side .theme-switch{display:none}
  .menu-open .side{transform:none;opacity:1;visibility:visible}
  .menu-open{overflow:hidden}
  .wrap{width:min(1040px,100% - 32px)}
}

/* ---- home ---- */
section{padding:clamp(48px,7vw,88px) 0}
.hero{padding:clamp(48px,8vw,96px) 0 clamp(40px,6vw,72px)}
.role{color:var(--accent);font-weight:500;font-size:.88rem;margin-bottom:10px}
.intro{max-width:58ch;font-size:clamp(1.05rem,2vw,1.2rem);color:var(--muted);display:flex;flex-direction:column;gap:12px}
.intro strong{color:var(--text);font-weight:500}
.links{display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:28px;font-weight:500}
.links a{text-decoration:none;border-bottom:2px solid var(--accent);padding-bottom:2px}
.links a:hover{color:var(--accent)}
.sec-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 18px;margin-bottom:28px}
.sec-head h2{font-size:clamp(1.35rem,2.4vw,1.7rem);letter-spacing:-.02em}
.sec-head p{color:var(--muted)}
.folders{display:flex;flex-direction:column;gap:14px}
.folder{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px 28px;
  padding:22px 24px;border-radius:22px;background:var(--bg-3);transition:transform .2s}
.folder:hover{transform:translateY(-2px)}
.folder h3{font-size:1.4rem;letter-spacing:-.015em}
.folder p{color:var(--muted);margin-top:4px}
.folder-count{color:var(--muted);white-space:nowrap}
.folder-count b{color:var(--text);font-size:1.3rem}
.folder-count span{color:var(--accent);margin-left:8px}
@container content (max-width:520px){.folder{grid-template-columns:1fr;gap:10px}}

/* whole-card links: the title link stretches over its card */
.folder,.tile{position:relative}
.stretch{text-decoration:none}
.stretch::after{content:"";position:absolute;inset:0;z-index:1}
.tile sup a{position:relative;z-index:2}
sup.fn a{color:var(--accent);text-decoration:none;font-size:.7em;font-weight:500;padding-left:1px}

/* ---- folder page ---- */
.page{padding-top:clamp(36px,6vw,72px)}
.page-head{margin-bottom:clamp(32px,5vw,52px)}
.kicker{color:var(--accent);font-weight:500;font-size:.92rem;margin-bottom:10px}
.page-head h1{font-size:clamp(2.4rem,6vw,4.4rem);font-weight:800;letter-spacing:-.035em}
.page-head > p{margin-top:14px;color:var(--muted);font-size:1.08rem}
.folder-meta{font-weight:500}
.folder-desc{display:flex;flex-direction:column;gap:10px;margin-top:14px;max-width:70ch;color:var(--muted)}
.sources{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);font-size:.84rem;color:var(--muted);max-width:80ch}
.sources ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px}
.sources li a{color:var(--text)}
.sources li:target{color:var(--text)}
.sources .fine{margin-top:12px;color:var(--faint)}
.sources ol + .fine{margin-top:12px}
.sources .fine:first-child{margin-top:0}
.empty{color:var(--faint);grid-column:1 / -1;padding:24px 0}

.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:clamp(28px,4vw,40px) 24px}
.tile{display:flex;flex-direction:column;gap:14px}
.tile-body{display:flex;flex-direction:column;gap:8px}
.tile h3{font-size:1.35rem;letter-spacing:-.015em}
.summary{color:var(--muted);font-size:.93rem}
.art{position:relative;aspect-ratio:16/11;border-radius:22px;overflow:hidden;background:var(--bg-3);display:grid;place-items:center}
.art .wash{position:absolute;inset:-25%;background-size:cover;background-position:center;filter:blur(38px) saturate(1.35);opacity:.75;transition:transform .5s ease}
.art img{position:relative;width:46%;border-radius:23%;box-shadow:0 14px 30px -10px rgba(0,0,0,.45);transition:transform .35s ease}
.tile:hover .art img{transform:translateY(-4px) scale(1.04)}
.tile:hover .art .wash{transform:scale(1.08)}
.art.plain{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 22%,var(--bg-3)),var(--bg-3))}
.initials{position:relative;font-weight:800;font-size:2.2rem;letter-spacing:-.03em;color:var(--accent)}
.meta{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;font-size:.88rem;color:var(--muted)}
.tag{background:var(--bg-3);color:var(--muted);font-size:.8rem;padding:3px 10px;border-radius:999px;white-space:nowrap}
.meta .year{color:var(--faint)}
@container content (max-width:620px){
  .tiles{grid-template-columns:1fr;gap:26px}
  .tile{display:grid;grid-template-columns:104px 1fr;gap:16px;align-items:start}
  .tile .art{aspect-ratio:1;border-radius:18px}
  .tile .art img{width:64%}
  .tile h3{font-size:1.2rem;padding-top:4px}
}

/* ---- post page: a plain blog post ---- */
.crumb{display:inline-flex;gap:8px;text-decoration:none;color:var(--muted);font-size:.95rem}
.crumb:hover{color:var(--text)}
.post-head{display:flex;gap:18px;align-items:center;margin:22px 0 30px}
.post-icon{width:64px;height:64px;border-radius:23%;flex:none}
.post-head h1{font-size:clamp(1.8rem,4vw,2.6rem);font-weight:800;letter-spacing:-.025em}
.post-head .meta{margin-top:8px}
.post-content{display:flex;flex-direction:column;gap:18px;max-width:720px;font-size:1.05rem}
.post-content a:not(.stretch){color:var(--accent)}
.points{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.points li{position:relative;padding-left:24px}
.points li::before{content:"";position:absolute;left:2px;top:.42em;width:12px;height:7px;border-left:2px solid var(--accent);border-bottom:2px solid var(--accent);transform:rotate(-45deg)}
.fig{margin:6px 0}
.fig img{display:block;width:100%;border-radius:16px;background:var(--bg-3)}
.fig-s{width:min(280px,100%)}
.fig-m{width:min(480px,100%)}
.fig-l{width:100%}
.fig-row > div{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:12px}
.fig figcaption{margin-top:8px;font-size:.86rem;color:var(--muted)}
.post-links{list-style:none;margin:8px 0 0;padding:16px 0 0;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;gap:8px 22px}
.post-links a{text-decoration:none;font-weight:500}
.post-links a:hover{text-decoration:underline}

/* ---- under development: one page for every address while the admin switch is on ---- */
.ud{min-height:100vh;display:grid;place-items:center;padding:24px 16px}
.ud-card{max-width:560px;text-align:center;display:flex;flex-direction:column;align-items:center}
.ud-mark{width:56px;height:56px;border-radius:12px;margin-bottom:28px}
:root[data-theme="dark"] .ud-mark{filter:invert(1)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .ud-mark{filter:invert(1)}}
.ud h1{font-size:clamp(2.4rem,8vw,4.2rem);font-weight:800;letter-spacing:-.035em}
.ud-msg{margin-top:20px;color:var(--muted);font-size:1.1rem}
.ud .links{justify-content:center}
.ud-theme{position:fixed;right:18px;bottom:18px}

/* ---- groups: cards on the home page, a page per group ---- */
.groups-section{padding-top:0}
.groups{display:flex;flex-direction:column;gap:16px}
.group-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px 28px;
  padding:clamp(22px,3vw,30px) clamp(22px,3vw,32px);border-radius:24px;background:var(--bg-3);transition:transform .2s}
.group-card:hover{transform:translateY(-2px)}
.group-card h2{font-size:clamp(1.5rem,3vw,2rem);letter-spacing:-.025em}
.group-card p{color:var(--muted);margin-top:6px}
.group-count{color:var(--muted);white-space:nowrap}
.group-count b{color:var(--text);font-weight:500}
.group-count span{color:var(--accent);margin-left:8px}
@container content (max-width:520px){.group-card{grid-template-columns:1fr;gap:10px}}
a.kicker{display:inline-block;text-decoration:none}
a.kicker:hover{text-decoration:underline}
.nav-group summary a{color:inherit;text-decoration:none;flex:1;min-width:0}
.nav-group summary a:hover,.nav-group summary a[aria-current="page"]{color:var(--text)}
.nav-group summary a[aria-current="page"]{font-weight:500}
