@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

header img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
}

a {
  color: unset;
  text-decoration: none;
}
:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #f0ece4;
  --text-secondary: #888580;
  --text-muted: #4a4845;
  --accent: #c8b89a;
  --accent-dim: rgba(200, 184, 154, 0.12);
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* first time working on a scrollbar actually */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 2px;
}

/* Layout Part, I wanted to make it based on cards and containers, gotta be pretty, because I intend to use it everywhere */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* header */
header {
  padding: 5rem 2rem 4rem;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  animation: fadeUp 0.8s ease both;
}

header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

header .subtitle {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
}

header img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--border);
  margin-bottom: 1.5rem;
  transition: border-color var(--transition);
}

header img:hover {
  border-color: var(--accent);
}

header .role {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 2rem;
}

header .role span {
  color: var(--accent);
  font-weight: 400;
}

/* NAV */

nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

nav a,
nav button {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  transition: all var(--transition);
}
nav button {
  background: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--bg);
  border-color: transparent;
}

nav button:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--accent-dim);
  color: var(--accent);
}

nav a:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--accent-dim);
}

/* main section */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

/* sections */

section {
  animation: fadeUp 0.8s ease both;
}

section:nth-child(2) {
  animation-delay: 0.1s;
}
section:nth-child(3) {
  animation-delay: 0.2s;
}

section h2 {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

/* about */

#about p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 300;
}

#about p strong,
#about p em {
  color: var(--text-primary);
  font-style: normal;
  font-weight: 400;
}

/* skills */

#skills ul,
#contact ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

#skills li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 300;
}
#contact li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 300;
}

#contact li a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
#contact li a:hover {
  color: var(--text-primary);
}

#skills li strong,
#contact li strong {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 100px;
  flex-shrink: 0;
}

#projects {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#projects h2 {
  margin-bottom: 1.8rem;
}

article {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.5rem 1.5rem;
  align-items: start;
  transition: all var(--transition);
  cursor: default;
}

article:first-of-type {
  border-top: 1px solid var(--border);
}

article:hover {
  padding-left: 0.75rem;
}

article h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  grid-column: 1;
  grid-row: 1;
}

article p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
  grid-column: 1;
  grid-row: 2;
  max-width: 520px;
}

article a {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  transition: all var(--transition);
  flex-shrink: 0;
}

article a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* footer */

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
  border-top: 1px solid var(--border);
}

footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.6em;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* responsive*/

@media (max-width: 600px) {
  header {
    padding: 3rem 1.5rem 2.5rem;
  }
  main {
    padding: 0 1.5rem 4rem;
    gap: 3.5rem;
  }
  article {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  article a {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    margin-top: 0.5rem;
  }

  #skills li {
    flex-direction: column;
    gap: 0.2rem;
  }

  #skills li strong {
    min-width: unset;
  }
}

#contact li a {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition);
}

#contact li a:hover {
  color: var(--text-primary);
}

.project-preview {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
  width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 999;
}

.project-preview.visible {
  opacity: 1;
}

.project-preview img {
  width: 100%;
  display: block;
}

[data-preview] {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.details {
  color: var(--accent);
}
