@import url("https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;600&display=swap");

/* =========================================================
   Portfolio - Estefanía Turín
   Inspiración japonesa: mucho espacio en blanco (ma), papel
   washi, tinta sumi, un verde matcha y un único sello rojo.
   El HTML no cambia: solo la presentación.
   ========================================================= */

:root {
    color-scheme: light;

    --paper: #fffefd;        /* beige cremoso */
    --paper-deep: #e8e8e8;   /* bloques de código, imágenes */
    --ink: #3b3630;          /* sumi cálido, más suave */
    --muted: #7a7062;
    --line: #d6c9ae;
    --moss: #5b6b4f;         /* matcha apagado: enlaces */
    --moss-dark: #3d4a34;
    --seal: #b3382c;         /* hanko: único toque rojo */

    --serif: "Shippori Mincho", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--serif);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.95;
    letter-spacing: 0.02em;
    color: var(--ink);
    background-color: var(--paper);
    /* fibra de papel washi, muy sutil */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0 0.2 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    max-width: 40rem;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

/* ---------- Tipografía ---------- */

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.4;
    text-wrap: balance;
}

h1 {
    font-size: 1.9rem;
    letter-spacing: 0.08em;
    margin: 2rem 0 2rem;
}

/* pincelada corta bajo cada título principal */
h1::after {
    content: "";
    display: block;
    width: 2.5rem;
    height: 1px;
    background: var(--ink);
    margin-top: 1.25rem;
}

h1.center::after {
    margin-left: auto;
    margin-right: auto;
}

/* sello (hanko) como marca de sección */
h2 {
    position: relative;
    font-size: 1.55rem;
    letter-spacing: 0.05em;
    margin: 3.5rem 0 1.25rem;
    padding-left: 1.6rem;
}

h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 0.7rem;
    height: 0.7rem;
    background: var(--seal);
    border-radius: 1px;
}

h3 {
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    margin: 2.25rem 0 0.6rem;
}

h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--moss-dark);
    letter-spacing: 0.03em;
    margin: 1.75rem 0 0.5rem;
}

p, li {
    text-wrap: pretty;
}

p {
    margin: 0 0 1.35rem;
}

ul, ol {
    padding-left: 1.3rem;
    margin: 0 0 1.5rem;
}

li {
    margin-bottom: 0.55rem;
}

li::marker {
    color: var(--muted);
}

strong {
    font-weight: 600;
}

.center {
    text-align: center;
}

.intro {
    width: min(100%, 52rem);
    margin: 0 auto;
}

.intro h1 {
    margin-bottom: 2.5rem;
}

/* ---------- Enlaces ---------- */

a {
    color: var(--moss);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 100% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    padding-bottom: 1px;
    transition: color 0.25s ease, background-size 0.25s ease;
}

a:hover {
    color: var(--moss-dark);
    background-size: 100% 2px;
}

a:focus-visible {
    outline: 2px solid var(--moss);
    outline-offset: 4px;
}


/* ---------- Enlace "Volver" (oculta los corchetes del HTML) ---------- */

body > p:first-child {
    font-size: 0;
    line-height: 1;
    margin: 0 0 1rem;
}

body > p:first-child a {
    display: inline-block;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    background-image: none;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

body > p:first-child a::before {
    content: "\2190";
    margin-right: 0.6rem;
}

body > p:first-child a:hover {
    color: var(--moss-dark);
    border-color: var(--moss);
    background-color: var(--paper-deep);
}

/* ---------- Separadores ---------- */

/* Tras el título ya hay una pincelada corta: no se repite el separador */
h1 + hr {
    display: none;
}

/* Separador: pincelada que se afina en los extremos */
hr {
    border: 0;
    height: 3px;
    width: min(70%, 24rem);
    margin: 4.5rem auto;
    background: radial-gradient(ellipse at center, var(--muted) 0%, transparent 72%);
    opacity: 0.8;
}

/* ---------- Portada ---------- */

/* anillo desplazado, guiño al enso */
.profile-pic {
    width: 168px;
    height: 168px;
    object-fit: cover;
    border-radius: 50%;
    border: 0;
    outline: 1px solid var(--ink);
    outline-offset: 7px;
    margin: 1.5rem 0 1.75rem;
}

.center h3 {
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0.12em;
}

.social-icons a {
    color: var(--muted);
    background-image: none;
    font-size: 1.1rem;
    margin: 0 0.35rem;
    padding: 0;
}

.social-icons a:hover {
    color: var(--seal);
}

.nav-box {
    text-align: center;
    color: var(--line);
    letter-spacing: 0.1em;
    margin: 3rem 0 2rem;
}

.nav-box a {
    margin: 0 1.1rem;
}

/* Lista de proyectos de la portada (sin cambiar el HTML) */

#proyectos + div br {
    display: none;
}

#proyectos + div strong {
    display: block;
    font-weight: 400;
    padding: 0.7rem 0 0.7rem 1.6rem;
}

#proyectos + div strong a {
    display: inline;
    transition: color 0.25s ease;
}

#proyectos + div strong a:hover {
    color: var(--seal);
}

/* ---------- Páginas de proyecto ---------- */

.project-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2rem auto 0.75rem;
    border: 1px solid var(--line);
    padding: 0.5rem;
    background: var(--paper-deep);
}

/* ---------- Código ---------- */

pre {
    background-color: var(--paper-deep);
    border: 0;
    border-left: 2px solid var(--moss);
    padding: 1.1rem 1.25rem;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.65;
    letter-spacing: 0;
    margin: 1.5rem 0 2rem;
}

pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
}

code {
    font-family: var(--mono);
    font-size: 0.85em;
    letter-spacing: 0;
    background-color: var(--paper-deep);
    padding: 0.1em 0.4em;
}

/* ---------- Tablas ---------- */

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0 2rem;
    font-size: 0.98rem;
}

th, td {
    border: 0 !important;
    padding: 0.6rem 0.5rem !important;
    text-align: left;
    vertical-align: top;
}

th {
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--muted);
    border-bottom: 1px solid var(--ink) !important;
}

/* ---------- Sobre mí ---------- */

.course-meta {
    color: var(--muted);
    font-size: 0.92em;
}


/* Habilidades: una fila por categoría */

body:has(ul.clean-list) h2 + ul {
    list-style: none;
    padding-left: 0;
}

body:has(ul.clean-list) h2 + ul > li {
    padding: 0;
    margin: 0 0 1.1rem;
    border: 0;
}

/* Cursos: título en primer plano, institución y año más tenues */

ul.clean-list li {
    padding: 0;
    margin: 0 0 1.6rem !important;
    border: 0;
}

ul.clean-list li strong {
    font-size: 1.05rem;
}

/* ---------- Móvil ---------- */

@media (max-width: 600px) {
    body {
        font-size: 1rem;
        line-height: 1.85;
        padding-top: 2.5rem;
    }

    h1 {
        font-size: 1.55rem;
        letter-spacing: 0.05em;
    }

    h2 {
        font-size: 1.35rem;
    }

    hr {
        margin: 3rem 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

.logo {
    font-size: 22px;
}

header {
    max-width: 650px;
    margin: 25px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post {
    margin-bottom: 12px;
}

.post time {
    display: block;
    color: #888;
    font-size: 20px;
}

.post a {
    display: block;
    color: #d43f2f;
    font-size: 20px;
    text-decoration: none;
}

.profile {
    display: block;
    margin-top: 2.5rem;
}

.profile img {
    float: left;
    width: 220px;
    height: 220px;
    object-fit: cover;
    margin: 0.4rem 2rem 1rem 0;
}

.profile-text {
    display: block;
}

.profile-text p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.7;
    letter-spacing: 0.015em;
    text-align: justify;
}

/* Hace que el contenedor abarque también la altura de la imagen */
.profile::after {
    content: "";
    display: block;
    clear: both;
}

.about-page h1 {
    font-size: 30px;
    font-weight: normal;
    margin-bottom: 25px;
}
