/* --- Design System & Variables --- */
:root {
  /* Dark Mode (Default) */
  --bg-color: #000000;
  --panel-color: #1c1c1e;
  --text-main: #f5f5f7;
  --text-muted: #86868b;
  --accent: #2997ff;
  --nav-bg: rgba(0, 0, 0, 0.8);
  --nav-border: rgba(255, 255, 255, 0.16);
  --hero-gradient-start: #ffffff;
  --hero-gradient-end: #a1a1a6;
  --hero-bg-opacity: 0.5;
  --hero-blend: normal;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Light Mode Variables --- */
[data-theme="light"] {
  --bg-color: #f5f5f7;
  --panel-color: #ffffff;
  --text-main: #1d1d1f;
  --text-muted: #6e6e73;
  --accent: #0066cc;
  --nav-bg: rgba(245, 245, 247, 0.8);
  --nav-border: rgba(0, 0, 0, 0.08);
  --hero-gradient-start: #1d1d1f;
  --hero-gradient-end: #6e6e73;
  --hero-bg-opacity: 0.85;
  --hero-blend: multiply;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-stack);
  letter-spacing: -0.01em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a{
  text-decoration: none;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 48px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  border-bottom: 1px solid var(--nav-border);
}

.nav-container {
  max-width: 1024px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 22px;
}

.logo {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  margin-left: 24px;
}

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

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  margin-left: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
}

.theme-toggle:hover {
  color: var(--text-main);
}

.hero {
  position: relative;
  height: 85vh;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding-top: 120px;
  overflow: hidden;
  background-color: var(--bg-color);
}

.hero-bg {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1440px;
  height: 60%;
  background-image: url('https://images.unsplash.com/photo-1581092160562-40aa08e78837?q=80&w=1470&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
  opacity: var(--hero-bg-opacity);
  mix-blend-mode: var(--hero-blend);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 22px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.005em;
  margin-bottom: 12px;
  background: linear-gradient(180deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 24px;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto 20px auto;
}

.cta-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  font-weight: 400;
}

.cta-link:hover {
  text-decoration: underline;
}

.cta-link::after {
  content: " ➔";
  font-size: 12px;
  margin-left: 5px;
}

/* --- Main Container --- */
.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 80px 22px;
}

section h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 40px;
  letter-spacing: -0.002em;
}

/* --- Portfolio Grid Architecture --- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 19px;
  }
}

/* Portfolio Cards with Structural Images */
.card {
  background-color: var(--panel-color);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--nav-border);
}

.card-image-wrapper {
  width: 100%;
  height: 220px;
  background-color: rgba(134, 134, 139, 0.1);
  overflow: hidden;
  position: relative;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.card:hover .card-image-wrapper img {
  transform: scale(1.03);
}

.card-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.card-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

/* --- About Section Styles --- */
.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 24px;
}

.about-text p:last-child {
  color: var(--text-muted);
}

.about-metrics {
  background-color: var(--panel-color);
  border: 1px solid var(--nav-border);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--nav-border);
  padding-bottom: 16px;
}

.metric-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.icon-whatsapp svg {
  fill: #25D366;
  transition: fill 0.2s;
}

.icon-telegram svg {
  fill: #24A1DE;
  transition: fill 0.2s;
}

.icon-linkedin svg {
  fill: #0077B5;
  transition: fill 0.2s;
}

.icon-email svg {
  fill: #EA4335;
  transition: fill 0.2s;
}

/* Hover effects */
.icon-whatsapp:hover svg {
  fill: #128C7E;
}

.icon-telegram:hover svg {
  fill: #1d82b2;
}

.icon-linkedin:hover svg {
  fill: #005582;
}

.icon-email:hover svg {
  fill: #c53023;
}

/* Responsive Breakpoint for About Layout */
@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-text p {
    font-size: 17px;
  }
}

/* --- Footer --- */
footer {
  background-color: var(--panel-color);
  border-top: 1px solid var(--nav-border);
  padding: 40px 22px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}