/* ========================================
   ikrom.dev — Clean, modern portfolio
   ======================================== */

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

:root {
  --bg: #f8fafc;
  --bg-subtle: #ffffff;
  --text: #0f0f0f;
  --text-muted: #4b5563;
  --primary: #050505;
  --accent: #111111;
  --border: #d4d4d4;
  --radius: 0.625rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Open Sans",
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--text-muted);
  outline-offset: 2px;
}

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================================
   NAV
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.nav-cta {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #ffffff !important;
  border-radius: var(--radius);
  font-weight: 500;
}

.nav-cta:hover {
  background: var(--accent);
  opacity: 1;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition:
    transform 0.2s,
    opacity 0.2s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   HERO
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 1.5rem 4rem;
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  justify-content: center;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.btn-secondary:hover {
  background: rgba(17, 17, 17, 0.05);
  color: var(--text);
  border-color: var(--accent);
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
  padding: 4rem 0;
}

.section-heading {
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

/* ========================================
   SERVICES
   ======================================== */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service {
  padding: 1.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.service:hover {
  border-color: var(--border);
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.06);
}

.service-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.service h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.service p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ========================================
   PROJECTS
   ======================================== */

.project-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
  position: relative;
}

.project:hover {
  border-color: var(--border);
  box-shadow: 0 4px 16px rgba(2, 6, 23, 0.06);
}

.project-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg-subtle);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.project:hover .project-image img {
  transform: scale(1.02);
}

.project-content {
  display: flex;
  flex-direction: column;
}

.project-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.project-type,
.project-year {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.project-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.project-stack {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-top: auto;
}

.view-all {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: underline;
  transition: opacity 0.2s;
}

.view-all:hover {
  opacity: 0.8;
}

/* ========================================
   ABOUT
   ======================================== */

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

.about-lead {
  font-size: 1.125rem;
  color: var(--text);
  font-weight: 500;
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Bento Grid */
.about-bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.bento-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bento-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.bento-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.bento-highlight {
  background: var(--primary);
  border-color: var(--primary);
}

.bento-highlight .bento-number,
.bento-highlight .bento-label {
  color: white;
}

.bento-number {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.bento-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Tech Badges */
.about-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text-muted);
}

/* ========================================
   CONTACT
   ======================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-heading {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.contact-info p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 1rem;
}

.contact-note {
  font-size: 0.875rem !important;
  color: var(--text-muted);
  font-style: italic;
}

.contact-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.contact-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form .btn-primary {
  width: fit-content;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.footer-location {
  color: var(--text-muted);
}

/* ========================================
   FADE-IN ANIMATION
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   LIGHTBOX
   ======================================== */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-subtle);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 200;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.125rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .about-bento {
    grid-template-columns: 1fr;
  }

  .contact-links {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr auto;
    gap: 4rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-bento {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .project {
    grid-template-columns: 320px 1fr;
  }
}

@media (min-width: 1024px) {
  .nav {
    padding: 1.25rem 3rem;
  }

  .hero {
    padding: 6rem 1.5rem 4rem;
  }

  .section {
    padding: 5rem 0;
  }

  .hero-image img {
    width: 320px;
  }
}
