/* ============================================
   Sabahattin Aluc — Personal Brand Site
   Mobile-first responsive CSS
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Colors */
  --primary: #2D2D2D;
  --primary-hover: #1A1A19;
  --accent: #D4A853;
  --accent-hover: #B8923F;
  --bg-base: #F5F0E8;
  --bg-surface: #FAF8F5;
  --bg-dark: #2D2D2D;
  --text-primary: #1E1E1E;
  --text-secondary: #7A7570;
  --text-muted: #A8A09A;
  --text-inverse: #F0EBE3;
  --border-subtle: #E8E3DB;
  --border-focus: #D4A853;
  --error: #B33A3A;
  --success: #3A7D44;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Layout */
  --max-width: 960px;
  --reading-width: 680px;
  --narrow-width: 480px;
  --gutter: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(45,45,45,0.06);
  --shadow-md: 0 4px 16px rgba(45,45,45,0.10);
  --shadow-lg: 0 8px 32px rgba(45,45,45,0.14);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ---------- Focus States ---------- */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  height: 72px;
  display: flex;
  align-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.nav-links {
  display: none;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  color: var(--accent) !important;
}

.nav-cta::after {
  display: none;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.nav-toggle-icon span {
  display: block;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg-base);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--primary);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.mobile-menu-cta {
  color: var(--accent) !important;
  margin-top: var(--space-md);
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  padding: 0 var(--gutter);
}

.hero-content {
  text-align: center;
  animation: fadeInUp 0.6s ease-out both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-name {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 300;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s ease-out both;
}

@media (min-width: 768px) {
  .hero-name {
    font-size: 56px;
  }
}

@media (min-width: 1024px) {
  .hero-name {
    font-size: 64px;
  }
}

.hero-tagline {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  animation: fadeInUp 0.6s ease-out 0.15s both;
}

@media (min-width: 768px) {
  .hero-tagline {
    font-size: 20px;
  }
}

.hero-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s ease-out 0.25s both;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 44px;
  border: none;
  animation: fadeInUp 0.6s ease-out 0.35s both;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.btn-primary {
  background: var(--accent);
  color: var(--text-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(212,168,83,0.3);
}

.btn-primary:active {
  background: #A07D34;
  box-shadow: none;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- About Section ---------- */
.section-about {
  padding: var(--space-3xl) var(--gutter);
  background: var(--bg-surface);
}

@media (min-width: 768px) {
  .section-about {
    padding: var(--space-4xl) var(--gutter);
  }
}

.about-container {
  max-width: var(--reading-width);
  margin: 0 auto;
  text-align: center;
}

.about-photo {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  margin: 0 auto var(--space-xl);
}

@media (min-width: 768px) {
  .about-photo {
    width: 240px;
    height: 240px;
  }
}

.about-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
  .about-name {
    font-size: 36px;
  }
}

.about-rule {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto var(--space-xl);
}

.about-bio {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
  text-align: left;
}

.about-bio:last-child {
  margin-bottom: 0;
}

/* ---------- Work Section ---------- */
.section-work {
  padding: var(--space-3xl) var(--gutter);
  background: var(--bg-base);
}

@media (min-width: 768px) {
  .section-work {
    padding: var(--space-4xl) var(--gutter);
  }
}

.work-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .section-heading {
    font-size: 28px;
  }
}

.work-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  border-left: 3px solid transparent;
  padding-left: var(--space-md);
  margin-left: calc(-1 * var(--space-md));
}

@media (min-width: 768px) {
  .work-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-xl);
  }
}

.work-row:hover {
  background: rgba(212,168,83,0.04);
  border-left-color: var(--accent);
}

.work-row-content {
  flex: 1;
}

.work-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: var(--space-xs);
}

@media (min-width: 768px) {
  .work-title {
    font-size: 22px;
  }
}

.work-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.work-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.work-year {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  padding-top: 4px;
}

/* ---------- Writing Section ---------- */
.section-writing {
  padding: var(--space-3xl) var(--gutter);
  background: var(--bg-surface);
}

@media (min-width: 768px) {
  .section-writing {
    padding: var(--space-4xl) var(--gutter);
  }
}

.writing-container {
  max-width: 720px;
  margin: 0 auto;
}

.writing-entry {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.writing-date {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}

.writing-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: var(--space-sm);
  transition: color 0.2s ease;
}

@media (min-width: 768px) {
  .writing-title {
    font-size: 20px;
  }
}

.writing-entry:hover .writing-title {
  color: var(--accent);
}

.writing-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Contact Section ---------- */
.section-contact {
  padding: var(--space-3xl) var(--gutter);
  background: var(--bg-base);
}

@media (min-width: 768px) {
  .section-contact {
    padding: var(--space-4xl) var(--gutter);
  }
}

.contact-container {
  max-width: var(--narrow-width);
  margin: 0 auto;
  text-align: center;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .contact-heading {
    font-size: 36px;
  }
}

.contact-body {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

.contact-email {
  display: inline-block;
  font-size: 20px;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.contact-email:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-dark);
  padding: var(--space-3xl) var(--gutter) var(--space-xl);
}

@media (max-width: 767px) {
  .footer {
    padding: var(--space-2xl) var(--gutter);
  }
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-inverse);
  display: block;
  margin-bottom: var(--space-lg);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-social-link:hover {
  color: var(--accent);
}

.footer-copyright {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: var(--space-xl);
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-md);
  z-index: 200;
  transition: top 0.2s ease;
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}