/* ==========================================================================
   Oğuzhan Sarıtaş — personal site
   ========================================================================== */

:root {
  --bg: #fafaf9;
  --bg-alt: #f5f5f4;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #57534e;
  --subtle: #78716c;
  --border: #e7e5e4;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-soft: #fff1e6;
  --accent-contrast: #ffffff;
  --success: #16a34a;
  --shadow-sm: 0 1px 2px rgb(28 25 23 / 0.06);
  --shadow: 0 10px 30px -12px rgb(28 25 23 / 0.18);
  --header-bg: rgb(250 250 249 / 0.8);

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1120px;
  --header-h: 68px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0c0a09;
  --bg-alt: #141110;
  --surface: #1c1917;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --subtle: #8a837e;
  --border: #292524;
  --accent: #fb923c;
  --accent-hover: #fdba74;
  --accent-soft: rgb(251 146 60 / 0.12);
  --accent-contrast: #1c1917;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow: 0 10px 30px -12px rgb(0 0 0 / 0.6);
  --header-bg: rgb(12 10 9 / 0.75);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0a09;
    --bg-alt: #141110;
    --surface: #1c1917;
    --text: #f5f5f4;
    --muted: #a8a29e;
    --subtle: #8a837e;
    --border: #292524;
    --accent: #fb923c;
    --accent-hover: #fdba74;
    --accent-soft: rgb(251 146 60 / 0.12);
    --accent-contrast: #1c1917;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow: 0 10px 30px -12px rgb(0 0 0 / 0.6);
    --header-bg: rgb(12 10 9 / 0.75);
    color-scheme: dark;
  }
}

/* Base ------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg.fill {
  fill: currentColor;
  stroke: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
  color: var(--accent-contrast);
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 6px 20px -8px var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-contrast);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Header ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
}

.site-nav ul {
  display: flex;
  gap: 4px;
}

.site-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle .icon-moon,
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.menu-toggle {
  display: none;
}

.menu-toggle .icon-close,
.menu-open .menu-toggle .icon-menu {
  display: none;
}

.menu-open .menu-toggle .icon-close {
  display: block;
}

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--success);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(2.6); opacity: 0; }
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-role {
  margin-top: 16px;
  color: var(--accent);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 600;
}

.hero-role span {
  white-space: nowrap;
}

.hero-role .sep {
  margin: 0 6px;
  color: var(--subtle);
}

.hero-lead {
  max-width: 560px;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.socials svg {
  width: 18px;
  height: 18px;
}

.hero-media {
  position: relative;
}

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: var(--shadow);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 30%;
}

.floating-card {
  position: absolute;
  left: -28px;
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}

.floating-card svg {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.floating-card strong {
  color: var(--text);
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 64px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  padding: 24px;
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat dt {
  color: var(--subtle);
  font-size: 14px;
}

.stat dd {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Sections --------------------------------------------------------------- */

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.kicker {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-sub {
  margin-top: 12px;
  color: var(--muted);
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}

.about-grid .section-head {
  margin-bottom: 0;
}

.about-body p {
  color: var(--muted);
  font-size: 1.08rem;
}

.about-body p + p {
  margin-top: 18px;
}

/* Cards */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: var(--shadow);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.card p {
  color: var(--muted);
  font-size: 15px;
}

/* Resume */

.resume-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
}

.column-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 1.2rem;
}

.column-title svg {
  color: var(--accent);
}

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -28px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--bg);
}

.timeline-item:first-child::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.tl-period {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tl-period.current {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.timeline-item h4,
.edu-card h4 {
  font-size: 1.1rem;
}

.tl-org {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

.edu-card {
  margin-bottom: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.coursework {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.coursework summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.coursework summary::-webkit-details-marker {
  display: none;
}

.coursework summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s;
}

.coursework[open] summary::after {
  transform: rotate(45deg);
}

.coursework .chips {
  margin-top: 16px;
}

/* Chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.chips-lg li {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
}

/* Skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-group {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.skill-group h3 {
  margin-bottom: 18px;
  font-size: 1.05rem;
}

.skill-group .chips li {
  background: var(--bg);
}

/* Blog */

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.section-head-row .section-head {
  margin-bottom: 0;
}

.section-head-row .btn {
  flex-shrink: 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card:nth-child(n + 4) {
  display: none;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

a.post-card:hover {
  color: var(--text);
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: var(--shadow);
}

.post-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-alt);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

a.post-card:hover .post-thumb img {
  transform: scale(1.04);
}

.post-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 22px 24px 24px;
}

.post-date {
  color: var(--subtle);
  font-size: 13px;
  font-weight: 600;
}

.post-body h3 {
  font-size: 1.1rem;
  line-height: 1.35;
}

.post-body p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.post-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.post-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

a.post-card:hover .post-more svg {
  transform: translateX(3px);
}

.skeleton .post-thumb,
.skeleton .post-body span {
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border) 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skeleton .post-body span {
  display: block;
  height: 14px;
  border-radius: 6px;
}

.skeleton .post-body span:nth-child(1) { width: 30%; }
.skeleton .post-body span:nth-child(2) { width: 90%; height: 20px; }
.skeleton .post-body span:nth-child(3) { width: 70%; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.posts-empty {
  grid-column: 1 / -1;
  padding: 40px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* Contact */

.cta {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 56px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, var(--accent-soft), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.cta h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cta-text > p:last-child {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.08rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.contact-item > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.contact-item .ci-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.ci-label {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ci-value {
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.ci-value:hover {
  color: var(--accent);
}

.copy-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-list .btn {
  margin-top: 4px;
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 14px;
}

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

.socials-sm {
  margin: 0;
  gap: 20px;
}

.socials-sm a {
  display: inline;
  width: auto;
  height: auto;
  border: 0;
  color: var(--muted);
}

.socials-sm a:hover {
  transform: none;
}

/* Back to top & toast ---------------------------------------------------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, color 0.2s;
}

.to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  color: var(--accent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Reveal animation ------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid .post-card:nth-child(4) { display: flex; }
  .hero-grid { gap: 40px; }
  .floating-card { left: -12px; }
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .hide-mobile { display: none; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 12px 24px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }

  .menu-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 2px;
  }

  .site-nav a {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 17px;
  }

  .hero { padding-top: 40px; }

  .hero-grid,
  .about-grid,
  .resume-grid,
  .cta {
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
    max-width: 360px;
  }

  .photo-frame { aspect-ratio: 1 / 1; }

  .floating-card { left: auto; right: -12px; bottom: 20px; }

  .about-grid { gap: 24px; }

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

  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }

  .section { padding: 72px 0; }

  .cta { padding: 36px 28px; gap: 32px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .cards-grid,
  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid .post-card:nth-child(4) { display: none; }
  .section-head-row { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-media { max-width: 280px; }
  .stat { padding: 18px; }
  .footer-inner { flex-direction: column; text-align: center; padding-right: 20px; }
  .site-footer { padding-bottom: 88px; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 360px) {
  .brand span { display: none; }
}
